Back to Library
Validation

Date (ISO 8601)

Matches dates in YYYY-MM-DD format.

Pattern
^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$

Test Cases

2023-10-05 Match
2023-13-01 No Match

Try it Live

Test and customize this pattern in our interactive editor

Open in Editor