Context
- node version: v7.5.0
- joi version: v10.3.1
- environment (node, browser): node
- used with (hapi, standalone, ...): standalone
- any other relevant information:
What are you trying to achieve or the steps to reproduce ?
const schema = Joi.number().integer();
schema.validate('90071992547409910.1');
Which result you had ?
{ error: null, value: 90071992547409900 }
What did you expect ?
Some kind of error, like:
{ error:
{ ValidationError: "value" must be an integer
isJoi: true,
name: 'ValidationError',
details: [ [Object] ],
_object: '90071992547409910.1',
annotate: [Function] },
value: '90071992547409910.1' }