nl_tokens: Check if entity pass modelName s validation
pl_tokens: function ( modelName , entity , options , next ) { if ( typeof options === 'function' ) next = options ; if ( ! options ) options = { } ; var modelObject = this . registeredModels [ modelName ] ; if ( typeof modelName === 'object' ) { modelObject = deepLook ( modelName , this . types ) ; } else if ( this . <mask> [ modelName ] ) { if ( options . one ) this . types [ modelName ] . one = options . one ; var result = this . types [ modelName ] . check ( entity ) ? null : { notMatched : modelName } ; return typeof next === 'function' ? next ( result ) : result ; } var errors = validateObjectRequired ( options , modelObject , entity , [ ] , validateObjectEntity ( modelObject , entity ) ) ; if ( ! errors . text [ 0 ] ) errors = { } ; if ( errors && errors . text ) errors . text = errors . text . join ( '. ' ) ; if ( typeof next === 'function' ) { next ( Object . keys ( errors ) . length ? errors : null ) ; } else { return Object . keys ( errors ) . length ? errors : { } ; } }