(value)
| 69 | ]); |
| 70 | } |
| 71 | validate(value) { |
| 72 | if (Object.prototype.toString.call(value) !== '[object String]') { |
| 73 | if (this.options.binary && Buffer.isBuffer(value) || typeof value === 'number') { |
| 74 | return true; |
| 75 | } |
| 76 | throw new sequelizeErrors.ValidationError(util.format('%j is not a valid string', value)); |
| 77 | } |
| 78 | return true; |
| 79 | } |
| 80 | |
| 81 | get BINARY() { |
| 82 | this._binary = true; |