Created by Ely on 7/21/2014.
Methods
-
static notEmptyValidator(options, value) → {Object}
-
Returns a validation result indicating whether give `value` is an empty* value or not (*@see `notEmptyValidatorNoNormalize` for more about empties).
Parameters:
Name Type Description options
Object value
* Returns:
Object -
static notEmptyValidator1(value) → {Object}
-
Same as `notEmptyValidator` except doesn't require first parameter ("options" parameter). (*@see `notEmptyValidatorNoNormalize` for more about empties).
Parameters:
Name Type Description value
* Returns:
Object -
static notEmptyValidatorNoNormalize(options, value) → {*}
-
Validates whether incoming `value` is empty* or not also doesn't normalize the passed in options parameter (since currently `notEmptyValidator` has no options other than it's `messageTemplates` field). * 'empty' in our context means one of `null`, `undefined`, empty lists (strings/arrays) (`x.length === 0`), `false`, empty object (obj with `0` enumerable props), and empty collection/iterable object (`Map`, `Set` etc.), NaN, Also this method is useful when the user, themselves, have to call `toNotEmptyOptions` for a specific reason.
Parameters:
Name Type Description options
Object value
* Returns:
* -
static toNotEmptyOptions(options) → {Object}
-
Normalizes incoming options so that they are valid `notEmptyValidator` options.
Parameters:
Name Type Description options
Object Returns:
Object