Closed ahmed-medhat-tawfiq closed 6 years ago
i c that Ajv pkg provide json schema v5 and it have formatMinimum
and formatMaximum
to add min and maz to date type for example
but they have bad error msgs not like joi and allow unknown/ extra fields by default (you need to add "additionalProperties": false
for each nested object)
sorry min and max date as already exist in Enjoi i found that in one of commits i don't know why u didn't mention that in in ReadMe
anyway i test that in example
and i works well
i just need to add minimum and maximum to
effectiveDate
attribute, i know that i can add it in types to be like thatdate: Joi.date().min('12-21-2012')
but this is a bad soln as maybe i have more than one attribute with type of date ?!!