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

Method validate

lib/data-types.js:383–388  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

381 return 'TINYINT(1)';
382 }
383 validate(value) {
384 if (!Validator.isBoolean(String(value))) {
385 throw new sequelizeErrors.ValidationError(util.format('%j is not a valid boolean', value));
386 }
387 return true;
388 }
389 _sanitize(value) {
390 if (value !== null && value !== undefined) {
391 if (Buffer.isBuffer(value) && value.length === 1) {

Callers

nothing calls this directly

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected