We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2888fa8 commit c659144Copy full SHA for c659144
frontend/src/utils/validators.ts
@@ -1,14 +1,16 @@
1
+/* eslint-disable */
2
+
3
export const nameValidator = (value: string) => {
4
if (value.length === 0) {
- return "Name must be not empty"
5
+ return "Name must not be empty"
6
}
7
8
if (value.length > 50) {
9
return "Name must be at most 50 characters long";
10
11
12
if (!/^[a-zA-Z\s-]*$/.test(value)) {
- return "Name must contain only alphabetical, hypen and white space characters";
13
+ return "Name must contain only alphabetical, hyphen and white space characters";
14
15
16
return "";
0 commit comments