Skip to content

Commit

Permalink
Using pattern that allows dates without leading 0
Browse files Browse the repository at this point in the history
  • Loading branch information
thamara committed Jan 8, 2024
1 parent 81ab457 commit 09dd2b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/validate-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const schemaFlexibleEntry = {
'date': {
'type': 'string',
'format': 'dateFormat',
'pattern': /(1|2)[0-9]{3}-(0[1-9]{1}|1[0-2]{1})-(0[0-9]{1}|1[0-9]{1}|2[0-9]{1}|3[0-1]{1})/
'pattern': /(1|2)[0-9]{3}-(0?[1-9]{1}|1[0-2]{1})-(0?[0-9]{1}|1[0-9]{1}|2[0-9]{1}|3[0-1]{1})/
},
'values': {
'type': 'array',
Expand Down

0 comments on commit 09dd2b6

Please sign in to comment.