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') {