Skip to content

Commit

Permalink
fix: teamberatungsstelle true on add and validation for postcode
Browse files Browse the repository at this point in the history
  • Loading branch information
Soarecos committed Aug 11, 2022
1 parent 4067b25 commit 38fbef1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/components/Agency/AgencyAddAllgemeines.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,21 @@ export default function AgencieAddAllgemeines() {
<Item
label={t("agency.add.allgemeines.address.postcode")}
name="postcode"
rules={[{ required: true }]}
rules={[
{ required: true },
{
min: 5,
message: t(
"agency.add.allgemeines.address.range.error"
),
},
]}
>
<Input
placeholder={t(
"agency.add.allgemeines.address.postcode"
)}
minLength={5}
maxLength={5}
/>
</Item>
Expand Down Expand Up @@ -245,7 +254,7 @@ export default function AgencieAddAllgemeines() {
<div className="flex">
<Switch
size="default"
defaultChecked={false}
defaultChecked
onChange={(value) => {
setIsTeamAgency(value);
formAgencyAdd.setFieldsValue({
Expand Down
1 change: 1 addition & 0 deletions src/locales/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
"agency.add.allgemeines.more_settings.cancel": "Abbrechen",
"agency.add.allgemeines.address": "Adresse",
"agency.add.allgemeines.address.postcode": "PLZ",
"agency.add.allgemeines.address.range.error": "Bitte geben Sie einen 5-stelligen Wert ein",
"agency.add.allgemeines.address.city": "Stadt",
"agency.add.allgemeines.address.zip_code_scope": "Postleitzahl Umfang",
"agency.add.allgemeines.address.zip_code_scope.information": "Umkreis für Beratungsstelle einstellen",
Expand Down

0 comments on commit 38fbef1

Please sign in to comment.