Skip to content

Commit eec33b4

Browse files
authored
Fix/housing reference settings (#105)
* Changed housing type form settings and fixed spelling
1 parent 49d51d4 commit eec33b4

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

packages/frontend/src/pages/Residences/components/HousingTypeDetailsSection.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,30 @@ const fieldConfigs: any = {
1717
type: 'text',
1818
placeholder: 'Namn på nuvarande hyresvärd',
1919
},
20+
controller: {
21+
rules: {
22+
value: true,
23+
message: 'Du behöver ange nuvarande hyresvärd.',
24+
validate: (value: string) => {
25+
return value !== '' || 'Du behöver ange nuvarande hyresvärd.'
26+
},
27+
},
28+
},
2029
} as any,
2130
housingTypeDescription: {
2231
label: 'Beskriv boende *',
2332
input: {
2433
type: 'text',
2534
},
35+
controller: {
36+
rules: {
37+
value: true,
38+
message: 'Du behöver beskriva boende.',
39+
validate: (value: string) => {
40+
return value !== '' || 'Du behöver beskriva boende.'
41+
},
42+
},
43+
},
2644
},
2745
numAdults: {
2846
label: 'Antal vuxna i hushåll *',
@@ -68,6 +86,17 @@ const fieldConfigs: any = {
6886
'housingReference.phone': {
6987
label: 'Telefonnummer hyresvärd *',
7088
input: { type: 'tel' },
89+
controller: {
90+
rules: {
91+
value: true,
92+
message: 'Du behöver fylla i telefonnummer till hyresvärd.',
93+
validate: (value: string) => {
94+
return (
95+
value !== '' || 'Du behöver fylla i telefonnummer till hyresvärd.'
96+
)
97+
},
98+
},
99+
},
71100
},
72101
'housingReference.email': {
73102
label: 'Mejladress hyresvärd',

0 commit comments

Comments
 (0)