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

Method validateSometimes

lib/rules.js:179–191  ·  view source on GitHub ↗
(field, value, args)

Source from the content-addressed store, hash-verified

177 }
178
179 async validateSometimes(field, value, args) {
180
181 if (this.isEmpty(value) && !args.length) {
182 delete this.validator.inputs[field];
183 return true;
184 }
185
186 if (args.length) {
187 // to be coded
188 }
189
190 return true;
191 }
192
193 /**
194 * apply rules on inputs

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.95

Tested by

no test coverage detected