Created by Ely on 1/21/2015.
- To Do:
-
- Allow validator option generators to receive `zero` object (object on which to extend on).
- Allow validator option generators to receive more than one options object.
Methods
-
static lengthValidator(options, value) → {Object}
-
Validates whether given value has a length and whether length is between given range (if given). Same as `lengthValidatorNoNormalize` except normalizes incoming options. (@see `toLengthOptions` for more on options).
Parameters:
Name Type Description options
Object value
* Returns:
Object -
static lengthValidatorNoNormalize(options, value) → {Object}
-
Validates whether given value has a length and whether length is between given range (if given) but doesn't normalize options. (@see `toLengthOptions` for range props).
Parameters:
Name Type Description options
Object value
* Returns:
Object -
static toLengthOptions(options) → {Object}
-
Normalizes `lengthValidator` options.
Parameters:
Name Type Description options
Object Returns:
Object