Closed SudoPlz closed 8 years ago
Here are proposed regexes for dob-schema
validation:
"^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$"
- works with DD/MM/YYYY
, DD-MM-YYY
, DD.MM.YYYY
and DD MM YYYY
"^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d$"
- all combinations as above, except the format is in form MM/DD/YYYY
.@ioannis suggested sending a UTC timestamp instead of a textual representation. I think its a better and more universal approach
I tried calling the
/user
endpoint giving it"dob": "MM/DD/YYYY",
value and it accepted it, then I tried giving it a"dob": "DD/MM/YYYY",
value and it accepted that too.Then I tried feeding it with an epoch timestamp
2117514496
but it did not accept that (I believe that way is a bit cleaner).So this is both a bug (the first part) and a feature request (the second part).