(displayName: string)
| 108 | .max(maxLenName, `${name} cannot be longer than ${maxLenName} characters`); |
| 109 | |
| 110 | export const displayNameValidator = (displayName: string): Yup.StringSchema => |
| 111 | Yup.string() |
| 112 | .matches( |
| 113 | displayNameRE, |
| 114 | `${displayName} must start and end with non-whitespace character`, |
| 115 | ) |
| 116 | .max( |
| 117 | displayNameMaxLength, |
| 118 | `${displayName} cannot be longer than ${displayNameMaxLength} characters`, |
| 119 | ) |
| 120 | .optional(); |
| 121 | |
| 122 | export const iconValidator = Yup.string().label("Icon").max(256); |
no test coverage detected