Methods
appRulesValidation(rules, store, appName, component) → {validationsObj}
Pass validation rules per application
Parameters:
Name |
Type |
Description |
rules |
Object
|
|
store |
Object
|
application store |
appName |
String
|
smartgut|smartjane|smartflu |
component |
String
|
validation component name |
- Source:
Returns:
-
Type
-
validationsObj
factoryValidationObj(valid, errorType) → {validationObj}
Create a validation object
Parameters:
Name |
Type |
Description |
valid |
Boolean
|
|
errorType |
String
|
|
- Source:
Returns:
-
Type
-
validationObj
Create a rule validator
Parameters:
- Source:
Returns:
-
Type
-
IRulesDescriptor
rulesCreator(types, descriptions) → {Object}
Create a set of rules validator
Parameters:
Name |
Type |
Description |
types |
Object
|
|
descriptions |
Array.<IDescription>
|
|
- Source:
Returns:
-
Type
-
Object
validate(rules, state, previus) → {validationsObj}
Pass array of rules
Parameters:
Name |
Type |
Description |
rules |
Array
|
|
state |
Object
|
|
previus |
Object
|
|
- Source:
Returns:
-
Type
-
validationsObj
Type Definitions
IDescription
Type:
Properties:
Name |
Type |
Description |
type |
string
|
|
name |
string
|
|
stateMap |
string
|
|
compareWith |
any
|
|
defaultValue |
any
|
|
- Source:
IRulesDescriptor
Type:
Properties:
Name |
Type |
Description |
errorType |
string
|
|
validate |
function
|
|
- Source:
validationObj
Type:
Properties:
Name |
Type |
Description |
valid |
boolean
|
|
error |
string
|
|
- Source:
validationsObj
Type:
Properties:
Name |
Type |
Description |
valid |
boolean
|
|
errors |
Array.<string>
|
|
- Source: