mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-27 05:51:56 +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
|
birthdate: yup
|
||||||
.string()
|
.string()
|
||||||
.required()
|
.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(),
|
sex: yup.string(),
|
||||||
address: yup.string().required(),
|
address: yup.string().required(),
|
||||||
citizenship: yup.string().required(),
|
citizenship: yup.string().required(),
|
||||||
|
|
@ -250,7 +250,6 @@
|
||||||
if (details !== undefined) {
|
if (details !== undefined) {
|
||||||
details.candidate.birthdate = details.candidate.birthdate
|
details.candidate.birthdate = details.candidate.birthdate
|
||||||
.split('-')
|
.split('-')
|
||||||
.map((x) => x.startsWith('0') ? x.slice(1) : x)
|
|
||||||
.reverse()
|
.reverse()
|
||||||
.join('.');
|
.join('.');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue