The date
type corresponds to the Joi.date()
schema.
The following example creates a date
validator:
{
bday: 'date:format = YYYY/MM/DD, min=1-1-1900'
}
{
bday: {
'@type': 'date',
format: 'YY/MM/DD',
min: '1-1-1900'
}
}
Most operations are available including:
min
max
required
format
iso
For more information on this type, see the Joi documentation.