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

Method validate

lib/model.js:4158–4160  ·  lib/model.js::Model.validate

* 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

4156 * @returns {Promise}
4157 */
4158 async validate(options) {
4159 return new InstanceValidator(this, options).validate();
4160 }
4161
4162 /**
4163 * 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