Skip to content

Commit 36c198a

Browse files
committed
Removed part added by mistake
1 parent 091de19 commit 36c198a

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

components/Checkout/Billing.component.jsx

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,21 @@ import { useForm } from 'react-hook-form';
22
import { InputField } from '../Input/InputField.component';
33
import { getCustomNumberValidation } from '../../functions/functions';
44

5-
const customPostNumberValidation = getCustomNumberValidation(
6-
{
7-
minLength: 'Postnummer må være minimum 4 tall',
8-
maxLength: 'Postnummer må være maksimalt 4 tall',
9-
pattern: 'Postnummer må bare være tall',
10-
},
11-
4
12-
);
13-
145
const inputs = [
156
{ label: 'Fornavn', name: 'firstName' },
167
{ label: 'Etternavn', name: 'lastName' },
178
{ label: 'Adresse', name: 'address1' },
189
{
1910
label: 'Postnummer',
2011
name: 'postcode',
21-
customValidation: customPostNumberValidation,
12+
customValidation: getCustomNumberValidation(
13+
{
14+
minLength: 'Postnummer må være minimum 4 tall',
15+
maxLength: 'Postnummer må være maksimalt 4 tall',
16+
pattern: 'Postnummer må bare være tall',
17+
},
18+
4
19+
),
2220
},
2321
{ label: 'Sted', name: 'city' },
2422
{
@@ -42,11 +40,6 @@ const inputs = [
4240
8
4341
),
4442
},
45-
{
46-
label: 'Postnummer',
47-
name: 'postcode',
48-
customValidation: customPostNumberValidation,
49-
},
5043
];
5144

5245
const Billing = ({ onSubmit }) => {

0 commit comments

Comments
 (0)