remove double space while registration

This commit is contained in:
smanylov
2026-02-23 12:07:42 +07:00
parent 9709b938f2
commit 891c3325c9
3 changed files with 9 additions and 3 deletions
+3 -1
View File
@@ -169,7 +169,9 @@ export default function RegisterForm() {
async function onChangeHandler(e: ChangeEvent<HTMLInputElement>): Promise<void> {
const fieldName = e.target.name;
if (fieldName !== 'phone') {
e.target.value = e.target.value.replace(/([^a-zA-Zа-яёА-ЯЁ0-9@.!#$%&"'*+/=?^_{|}~\-\s])/g, '');
e.target.value = e.target.value
.replace(/([^a-zA-Zа-яёА-ЯЁ0-9@.!#$%&"'*+/=?^_{|}~\-\s])/g, '')
.replace(/\s+/g, ' ');
}
if (fieldName === 'inn') {
+3 -1
View File
@@ -328,6 +328,8 @@
"field-filled-automatically": "The field is filled in automatically",
"inn-invalid": "Invalid INN",
"inn-placeholder": "Enter 10 digits",
"INN": "INN"
"INN": "INN",
"fullName-required": "Please fill in the field correctly.",
"fullName-too-short" : "Name must be at least 2 characters long."
}
}
+3 -1
View File
@@ -328,6 +328,8 @@
"field-filled-automatically": "Поле заполняется автоматически",
"inn-invalid": "Неверный ИНН",
"inn-placeholder": "Введите 10 цифр",
"INN": "ИНН"
"INN": "ИНН",
"fullName-required": "Заполните поле корректно.",
"fullName-too-short" : "Имя должно содержать не менее 2 символов."
}
}