nl_tokens: Rule for validating the type of a value .
pl_tokens: function type ( rule , value , source , errors , options ) { if ( rule . required && value === undefined ) { required ( rule , value , source , errors , options ) ; return ; } const custom = [ 'integer' , 'float' , 'array' , 'regexp' , 'object' , 'method' , 'email' , 'number' , 'date' , 'url' , 'hex' ] ; const ruleType = rule . type ; if ( custom . indexOf ( ruleType ) > - 1 ) { if ( ! types [ ruleType ] ( value ) ) { errors . push ( util . format ( options . messages . types [ ruleType ] , rule . fullField , rule . type ) ) ; } // straight typeof check } else if ( ruleType && typeof ( value ) !== rule . type ) { errors . push ( util . format ( options . messages . types [ ruleType ] , <mask> . fullField , rule . type ) ) ; } }