mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 12:35:31 +00:00
feat: DD.MM.YYYY birthdate format
This commit is contained in:
parent
2baafbcd48
commit
d09d7dfff3
1 changed files with 1 additions and 2 deletions
|
|
@ -81,7 +81,7 @@
|
|||
birthdate: yup
|
||||
.string()
|
||||
.required()
|
||||
.matches(/^([0-3]?[0-9])\.([1-9]|1[0-2])\.[0-9]{4}$/),
|
||||
.matches(/^([0-3]?[0-9])\.(0?[1-9]|1[0-2])\.[0-9]{4}$/),
|
||||
sex: yup.string(),
|
||||
address: yup.string().required(),
|
||||
citizenship: yup.string().required(),
|
||||
|
|
@ -250,7 +250,6 @@
|
|||
if (details !== undefined) {
|
||||
details.candidate.birthdate = details.candidate.birthdate
|
||||
.split('-')
|
||||
.map((x) => x.startsWith('0') ? x.slice(1) : x)
|
||||
.reverse()
|
||||
.join('.');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue