is(error, fn) {
    if(error instanceof Function) {
      fn = error;
      error = 'is';
    }
    if(fn(this.value, valLib) === false) {
      this.errors.push(error);
    }
    return this;
  }
/**
   * Executes the given validation function to validate the value.
   *
   * The value will be passed as the first parameter to the validation function and
   * the library {@link https://github.com/chriso/validator.js} as the second one.
   * If the function returns true the value is valid, otherwise it's invalid.
   *
   * @param {string} error The error message which will be used if the value is invalid
   * @param {Function} fn will be used to validate the value
   * @returns {util.Validator}
   */
Executes the given validation function to validate the value.

@param {string} error The error message which will be used if the value is invalid
@param {Function} fn will be used to validate the value
@returns {util.Validator}
Executes the given validation function to validate the value . @param { string } error The error message which will be used if the value is invalid @param { Function } fn will be used to validate the value @returns { util . Validator }
is(error, fn) {
    if(error instanceof Function) {
      fn = error;
      error = 'is';
    }
    if(fn(this.value, valLib) === false) {
      this.errors.push(error);
    }
    return this;
  }
is ( error , fn ) { if ( error instanceof Function ) { fn = error ; error = 'is' ; } if ( fn ( this . value , valLib ) === false ) { this . errors . push ( error ) ; } return this ; }
Executes the given validation function to validate the value.
Executes the given validation function to validate the value .