* The main entry point for the Validation module, invoke to start the dance. * * @returns {Promise} * @private
()
| 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 |
no test coverage detected