(name: string)
| 102 | |
| 103 | // REMARK: see #1756 for name/username semantics |
| 104 | export const nameValidator = (name: string): Yup.StringSchema => |
| 105 | Yup.string() |
| 106 | .required(`Please enter a ${name.toLowerCase()}.`) |
| 107 | .matches(usernameRE, "Special characters (e.g.: !, @, #) are not supported") |
| 108 | .max(maxLenName, `${name} cannot be longer than ${maxLenName} characters`); |
| 109 | |
| 110 | export const displayNameValidator = (displayName: string): Yup.StringSchema => |
| 111 | Yup.string() |
no test coverage detected