lib/validator-repo.js
function build(validatorName, validatorOptions) {

    if (typeof validatorBuildersRepository[validatorName] !== 'function') {
        throw validatorName + ' does not exists. use addValidatorBuilder to add a new validation rule';
    }

    return validatorBuildersRepository[validatorName](ValidationState, stateEnum, validatorOptions);
}
function build(validatorName, validatorOptions) {

    if (typeof validatorBuildersRepository[validatorName] !== 'function') {
        throw validatorName + ' does not exists. use addValidatorBuilder to add a new validation rule';
    }

    return validatorBuildersRepository[validatorName](ValidationState, stateEnum, validatorOptions);
}
function build ( validatorName , validatorOptions ) { if ( typeof validatorBuildersRepository [ validatorName ] !== 'function' ) { throw validatorName + ' does not exists. use addValidatorBuilder to add a new validation rule' ; } return validatorBuildersRepository [ validatorName ] ( ValidationState , stateEnum , validatorOptions ) ; }
Adds validator builder. Use to create custom validation rules.
@memberof! vivalid.validatorRepo
@function
@private
@param {validatorName} name validator name.
@param {object} validatorOptions.
Adds validator builder . Use to create custom validation rules .