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

Method validate

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

Source from the content-addressed store, hash-verified

205 return result;
206 }
207 validate(value) {
208 if (!Validator.isFloat(String(value))) {
209 throw new sequelizeErrors.ValidationError(util.format(`%j is not a valid ${this.key.toLowerCase()}`, value));
210 }
211 return true;
212 }
213 _stringify(number) {
214 if (typeof number === 'number' || typeof number === 'boolean' || number === null || number === undefined) {
215 return number;

Callers

nothing calls this directly

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected