diff --git a/src/app/actions/definitions.ts b/src/app/actions/definitions.ts index 4b68c1c..84e581c 100644 --- a/src/app/actions/definitions.ts +++ b/src/app/actions/definitions.ts @@ -23,6 +23,7 @@ export const SignupFormSchema = z full_name: z .string() .min(3, { error: 'register-error-name' }) + .regex(/^[^0-9]*$/, { message: 'register-error-no-digits' }) .trim(), email: z .string() diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json index 63c5c44..77fff71 100644 --- a/src/i18n/messages/en.json +++ b/src/i18n/messages/en.json @@ -116,6 +116,7 @@ "terms-of-use": "terms of use", "email-already-registered": "Email already registered", "password-does-not-match" : "Password does not match", - "email-not-found": "Email not found" + "email-not-found": "Email not found", + "register-error-no-digits": "The name should not contain a number." } } \ No newline at end of file diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json index febf7ce..e758ff2 100644 --- a/src/i18n/messages/ru.json +++ b/src/i18n/messages/ru.json @@ -116,6 +116,7 @@ "terms-of-use": "условиями использования", "email-already-registered": "Такой Email уже зарегистрирован", "password-does-not-match" : "Пароль не совпадает", - "email-not-found": "Email не найден" + "email-not-found": "Email не найден", + "register-error-no-digits": "В имени не должно быть цифр." } } \ No newline at end of file