API documentation automatically generated by docmeteor.
File: "lib/client/formly-validator.js" Where: {client}
AngularJS Service
Register validator
This method register is defined in formlyValidator
Arguments
- name {string}
validator identifier
- expression {function}
like formly expression but with field validator configuration as first argument
Add validator to field
This method setFieldValidator is defined in formlyValidator
Arguments
- field {object}
formlyConfig of field
- name {string}
validator name
- config {Any}
field validator configuration
Get validator configuration of field
This method getFieldValidator is defined in formlyValidator
Arguments
- field {object}
formlyConfig of field
- name {string}
validator name
Returns {Any} validator configuration for field
Create Error object with prefixed message
This method createError is defined in formlyValidator
Arguments
- msg {string}
error message
Returns {Error}
Checks if variable is empty
This method isEmpty is defined in formlyValidator
Arguments
- value {Any}
value to check
Returns {boolean}
You can put string representation of RegExp object (for example "[a-z]+") or just RegExp object.
Adds ^ and $ to string representation and returns undefined if it is not a string or RegExp object.
This method parseRegExp is defined in formlyValidator
Arguments
- regexp {string|RegExp}
Returns {RegExp}