remove double space while registration
This commit is contained in:
@@ -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') {
|
||||
|
||||
@@ -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."
|
||||
}
|
||||
}
|
||||
@@ -328,6 +328,8 @@
|
||||
"field-filled-automatically": "Поле заполняется автоматически",
|
||||
"inn-invalid": "Неверный ИНН",
|
||||
"inn-placeholder": "Введите 10 цифр",
|
||||
"INN": "ИНН"
|
||||
"INN": "ИНН",
|
||||
"fullName-required": "Заполните поле корректно.",
|
||||
"fullName-too-short" : "Имя должно содержать не менее 2 символов."
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user