(field)
| 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 | |
| 202 | class RuleField { |
no outgoing calls
no test coverage detected