MCPcopy Index your code
hub / github.com/bitnbytesio/node-input-validator / populateRule

Method populateRule

lib/validator.js:369–381  ·  view source on GitHub ↗

* re-arrange rules * @param field

(field)

Source from the content-addressed store, hash-verified

367 * @param field
368 */
369 populateRule(field) {
370
371 //console.log('filed and rule in populate rules', field, rule);
372
373 if (this.implicitRules.indexOf(this.rule.rule) >= 0) {
374 this.validations[field].rules.unshift(this.rule);
375 this.validations[field].required = true;
376 } else {
377 this.validations[field].rules.push(this.rule);
378 }
379
380 this.rule = {};
381 }
382
383 /**
384 *

Callers 2

parseRulesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected