Class: Base

fields. Base

new Base(name, options)

Base class for fields
Parameters:
Name Type Description
name String field name
options FieldOption field options
Source:

Methods

getAttributes() → {Ojbect}

Normalise attributes
Source:
Returns:
Type
Ojbect

getData() → {*}

Source:
Returns:
Type
*

processData()

Source:
To Do:
  • implement

renderAttributes(attrs) → {String}

Render attribute string
Parameters:
Name Type Description
attrs
Source:
Returns:
Type
String

setData(data)

Parameters:
Name Type Description
data
Source:

toHTML() → {string}

Source:
Returns:
Type
string

toJSON() → {Object}

Source:
Returns:
Type
Object

toString() → {String}

Source:
Returns:
Type
String

validate(callback)

Execute all validators on the field data.
Parameters:
Name Type Description
callback function
Source:

validateSync() → {*|Boolean}

Validate a field synchronously will not work if one of the validators is async.
Source:
Returns:
Type
* | Boolean