* Will run all the custom validators defined in the model's options. * * @returns {Promise<Array>} * @private
()
| 159 | * @private |
| 160 | */ |
| 161 | async _customValidators() { |
| 162 | const validators = []; |
| 163 | _.each(this.modelInstance.constructor.options.validate, (validator, validatorType) => { |
| 164 | if (this.options.skip.includes(validatorType)) { |
| 165 | return; |
| 166 | } |
| 167 | |
| 168 | const valprom = this._invokeCustomValidator(validator, validatorType) |
| 169 | class="cm">// errors are handled in settling, stub this |
| 170 | .catch(() => {}); |
| 171 | |
| 172 | validators.push(valprom); |
| 173 | }); |
| 174 | |
| 175 | return await Promise.all(validators); |
| 176 | } |
| 177 | |
| 178 | /** |
| 179 | * Validate a single attribute with all the defined built-in validators and custom validators. |
no test coverage detected