Skip to content

Commit 98623f7

Browse files
committed
492: Fix regex legibility
1 parent 4f30194 commit 98623f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client/src/pages/UserManagement/Validations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const buildNameValidation = () => {
1313
.trim()
1414
.min(2, "Name must be at least 2 characters")
1515
.max(50, "Name cannot be more than 50 characters")
16-
.matches(/^(?!.* )[a-zA-Z ]+$/, "Name must only contain letters and non-consecutive internal spaces")
16+
.matches(/^(?!.*\s{2,})[a-zA-Z ]+$/, "Name must only contain letters and non-consecutive internal spaces")
1717
.required("Name is required")
1818
}
1919

0 commit comments

Comments
 (0)