MCPcopy
hub / github.com/lfb/nodejs-koa-blog / validate

Method validate

core/lin-validator-v2.js:192–199  ·  view source on GitHub ↗
(field)

Source from the content-addressed store, hash-verified

190 }
191
192 validate(field) {
193 if (this.name == 'isOptional')
194 return new RuleResult(true)
195 if (!validator[this.name](field + '', ...this.params)) {
196 return new RuleResult(false, this.msg || this.message || '参数错误')
197 }
198 return new RuleResult(true, '')
199 }
200}
201
202class RuleField {

Callers 7

validateMethod · 0.45
admin.jsFile · 0.45
reply.jsFile · 0.45
category.jsFile · 0.45
user.jsFile · 0.45
comment.jsFile · 0.45
article.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected