feat: require birthSurname

This commit is contained in:
EETagent 2023-01-26 23:07:03 +01:00
parent 1439edaf79
commit 5be3c4cd21
3 changed files with 6 additions and 4 deletions

View file

@ -111,6 +111,7 @@
.string()
.required()
.matches(/^([0-3]?[0-9])\.(0?[1-9]|1[0-2])\.[0-9]{4}$/),
birthSurname: yup.string().required(),
sex: yup.string(),
address: yup.string(),
street: yup.string().required(),
@ -382,6 +383,7 @@
details.parents.map(
(x) => (x.telephone = x.telephone != '' ? formatTelephone(x.telephone) : '')
);
form.set({
gdpr: true,
linkOk: true,
@ -703,7 +705,7 @@
bind:selectedSchool={$form.candidate.firstSchool}
/>
</span>
<span class="mt-10 field">
<span class="field mt-10">
<SchoolSelect
error={$typedErrors['candidate']['secondSchool']['name'] ||
$typedErrors['candidate']['secondSchool']['field']}

View file

@ -134,7 +134,7 @@ const cs: BaseTranslation = {
input: {
optional: 'nepovinné',
nameSurname: 'Jméno a příjmení',
birthSurname: 'Rodné příjmení (pokud odlišné)',
birthSurname: 'Rodné příjmení',
email: 'E-mail',
telephone: 'Telefon',
address: 'Ulice a č. p.',

View file

@ -318,7 +318,7 @@ type RootTranslation = {
*/
nameSurname: string
/**
* Rodné příjmení (pokud odlišné)
* Rodné příjmení
*/
birthSurname: string
/**
@ -721,7 +721,7 @@ export type TranslationFunctions = {
*/
nameSurname: () => LocalizedString
/**
* Rodné příjmení (pokud odlišné)
* Rodné příjmení
*/
birthSurname: () => LocalizedString
/**