Skip to content

Commit 598e3c7

Browse files
committed
fix: update error handling and restrictions in TextField component tests
1 parent 1176486 commit 598e3c7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/profile/forms/elements/TextField.test.jsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,15 @@ describe('TextField', () => {
1414
visibility: 'private',
1515
editMode: 'editing',
1616
saveState: null,
17-
error: null,
17+
errorMessage: {
18+
required: 'This field is required',
19+
max_length: 'This field is too long',
20+
min_length: 'This field is too short',
21+
},
22+
restrictions: {
23+
max_length: 50,
24+
min_length: 5,
25+
},
1826
label: 'Username',
1927
placeholder: 'Enter your username',
2028
instructions: 'Provide a unique username',

0 commit comments

Comments
 (0)