MCPcopy
hub / github.com/sequelize/sequelize / validate

Method validate

src/model.js:4293–4295  ·  view source on GitHub ↗

* Validate the attributes of this instance according to validation rules set in the model definition. * * The promise fulfills if and only if validation successful; otherwise it rejects an Error instance containing { field name : [error msgs] } entries. * * @param {object} [options] Options

(options)

Source from the content-addressed store, hash-verified

4291 * @returns {Promise}
4292 */
4293 async validate(options) {
4294 return new InstanceValidator(this, options).validate();
4295 }
4296
4297 /**
4298 * This is the same as calling `set` and then calling `save` but it only saves the

Callers 1

saveMethod · 0.95

Calls 1

validateMethod · 0.65

Tested by

no test coverage detected