Skip to content

Commit

Permalink
Merge pull request #70 from helsingborg-stad/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
D3nnis38 authored Feb 8, 2024
2 parents 5b7b21a + 94734ff commit fc6ffcb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const CreateZonesForm = () => {
type="text"
value={zone.properties.name}
onChange={setFieldValue(index, 'name')}
name="name"
placeholder="Namn på zon"
error={errors[index]?.name}
/>
Expand All @@ -87,6 +88,7 @@ export const CreateZonesForm = () => {
value={zone.properties.address}
onChange={setFieldValue(index, 'address')}
placeholder="Adress till zon"
name="address"
error={errors[index]?.address}
disabled={!ready}
/>
Expand All @@ -98,10 +100,11 @@ export const CreateZonesForm = () => {
type="text"
value={zone.properties.area}
onChange={setFieldValue(index, 'area')}
name="area"
placeholder="Område"
error={errors[index]?.area}
/>
<Select label="Typ" value={zone.properties.type} onChange={setFieldValue(index, 'type')}>
<Select label="Typ" value={zone.properties.type} name="type" onChange={setFieldValue(index, 'type')}>
<option value="delivery">Leverans zon</option>
<option value="distribution">Distributions zon</option>
</Select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\da-zA-Z]).{10,}$/;
export const CreateAccountValidation = z.object({
orgNumber: z
.string()
.regex(/\d{10}/, { message: 'Fel format på organisationsnummer - ett organisationsnummer består av 10 siffror.' }),
.regex(/^[0-9]{10}$/, { message: 'Fel format på organisationsnummer - ett organisationsnummer består av 10 siffror.' }),
name: z.string().min(1, { message: 'Ange företagsnamn som hör till organisationsnumret' }),
email: z
.string()
Expand Down

0 comments on commit fc6ffcb

Please sign in to comment.