-
fake()
-
Creates object that is fake Store
Some time this is useful when you need to initialize local var,
before you could get actual Stores from central storage by its ID
Returns:
-
Type
-
Object
-
fake()
-
Creates object that is fake Store
Some time this is useful when you need to initialize local var,
before you could get actual Stores from central storage by its ID
Returns:
-
Type
-
Object
-
fieldInit(type, mutation, VARIANTS, FIELDS)
-
Creates field manifest
Parameters:
| Name |
Type |
Description |
type |
string
|
name/type of the field |
mutation |
Object
|
mutation to manifest from library |
VARIANTS |
Object
|
store which contains named lists of field value variants |
FIELDS |
Object
|
store which contains named lists of field manifests |
Returns:
field manifest
-
Type
-
Object
-
-
Initialization of form structure object
Parameters:
| Name |
Type |
Description |
form |
object
|
form structure object |
fieldName |
string
|
Array.<string>
|
name of the field type if string, array of strings = subform |
VARIANTS |
Object
|
store which contains named lists of field value variants |
FIELDS |
Object
|
store which contains named lists of field manifests |
formFieldsOptions |
Object
|
form wide options |
Returns:
form structure object
-
Type
-
Object
-
isFieldValid(form, fieldName)
-
Checks if field has errors
Parameters:
| Name |
Type |
Description |
form |
Object
|
form structure object |
fieldName |
string
|
name of the field |
Returns:
true - valid, false -invalid
-
Type
-
boolean
-
setFieldInvalid(form, fieldName, value, errors)
-
Marking field as invalid by own validator
Parameters:
| Name |
Type |
Description |
form |
Object
|
form structure object |
fieldName |
string
|
name of the field |
value |
any
|
value of field |
errors |
Array.<string>
|
list of errors |
Returns:
form structure object
-
Type
-
Object
-
setFieldValid(form, fieldName, value)
-
Marking field as valid by own validator
Parameters:
| Name |
Type |
Description |
form |
Object
|
form structure object |
fieldName |
string
|
name of the field |
value |
any
|
value of field |
Returns:
form structure object
-
Type
-
Object
-
-
Form level validator error in this field
Parameters:
| Name |
Type |
Description |
form |
Object
|
form structure object |
fieldName |
string
|
name of the field |
errors |
Array.<string>
|
list of errors |
Returns:
form structure object
-
Type
-
Object
-
-
Form level validator success in this field
Parameters:
| Name |
Type |
Description |
form |
Object
|
form structure object |
fieldName |
string
|
name of the field |
Returns:
form structure object
-
Type
-
Object
-
-
Updates fields and form error labels
Parameters:
| Name |
Type |
Description |
form |
Object
|
form structure object |
validationStatus |
Object
|
results of validation |