Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 565 Bytes

date.md

File metadata and controls

37 lines (27 loc) · 565 Bytes

Type: date

The date type corresponds to the Joi.date() schema.

String notation

The following example creates a date validator:

{
    bday: 'date:format = YYYY/MM/DD, min=1-1-1900'
}

Object notation

{
    bday: {

        '@type': 'date',
        format: 'YY/MM/DD',
        min: '1-1-1900'
    }
}

Additional properties

Most operations are available including:

  • min
  • max
  • required
  • format
  • iso

For more information on this type, see the Joi documentation.