Skip to content

Commit

Permalink
Fix date of birth validation
Browse files Browse the repository at this point in the history
  • Loading branch information
moiikana committed Nov 8, 2021
1 parent fade7e6 commit b4de560
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion i18n/de_DE/data/validation.json
Expand Up @@ -20,5 +20,5 @@
"subject": "^.+$",
"comment": "(\n|.)+"
},
"dateOfBirth": "^\\d{2}(\\.)\\d{2}(\\.)\\d{4}"
"dateOfBirth": "^(?:(?:31(\\.|\\/)(?:0?[13578]|1[02]))\\1|(?:(?:29|30)(\\.|\\/)(?:0?[13-9]|1[0-2])\\2))(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$|^(?:29(\\.|\\/)0?2\\3(?:(?:(?:1[6-9]|[2-9]\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\\d|2[0-8])(\\.|\\/)(?:(?:0?[1-9])|(?:1[0-2]))\\4(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$"
}
2 changes: 1 addition & 1 deletion i18n/en_GB/data/validation.json
Expand Up @@ -20,5 +20,5 @@
"subject": "^.+$",
"comment": "(\n|.)+"
},
"dateOfBirth": "^\\d{2}(\\/)\\d{2}(\\/)\\d{4}"
"dateOfBirth": "^(?:(?:31(\\.|\\/)(?:0?[13578]|1[02]))\\1|(?:(?:29|30)(\\.|\\/)(?:0?[13-9]|1[0-2])\\2))(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$|^(?:29(\\.|\\/)0?2\\3(?:(?:(?:1[6-9]|[2-9]\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\\d|2[0-8])(\\.|\\/)(?:(?:0?[1-9])|(?:1[0-2]))\\4(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$"
}

0 comments on commit b4de560

Please sign in to comment.