MCPcopy
hub / github.com/sequelize/sequelize / _validate

Method _validate

lib/instance-validator.js:67–80  ·  lib/instance-validator.js::InstanceValidator._validate

* The main entry point for the Validation module, invoke to start the dance. * * @returns {Promise} * @private

()

Source from the content-addressed store, hash-verified

65 * @private
66 */
67 async _validate() {
68 if (this.inProgress) throw new Error(class="st">'Validations already in progress.');
69
70 this.inProgress = true;
71
72 await Promise.all([
73 this._perAttributeValidators(),
74 this._customValidators()
75 ]);
76
77 if (this.errors.length) {
78 throw new sequelizeError.ValidationError(null, this.errors);
79 }
80 }
81
82 /**
83 * Invoke the Validation sequence and run validation hooks if defined

Callers 2

validateMethod · 0.95
_validateAndRunHooksMethod · 0.95

Calls 3

_customValidatorsMethod · 0.95
allMethod · 0.80

Tested by

no test coverage detected