Hapi/Joi Validation For Number Fails
问题 I am trying to validate number value which will include integer as well as float values. Following is my implementation for the same. Joi Schema. const numcheckschema = Joi.object().keys({ v1:Joi.number().empty("").allow(null).default(99999), v2:Joi.number().empty("").allow(null).default(99999), v3:Joi.number().empty("").allow(null).default(99999) }) Object objnum={ v1:"15", v2:"13.", v3:"15" } objValidated = Joi.validate(objnum, numcheckschema); console.log(objValidated); When i execute the