fix: auto zero remove aded to phone number input

This commit is contained in:
2025-09-06 15:51:41 +03:30
parent 76bebec9b6
commit cedce99986
2 changed files with 15 additions and 2 deletions

View File

@@ -53,7 +53,11 @@ export function LoginRegisterForm({
);
const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {
const newValue = event.target.value;
let newValue = event.target.value;
if (newValue.startsWith('09')) {
newValue = newValue.substring(1);
}
setLoginRegisterValue(newValue);
// If the new value contains only digits (or is empty), it's a phone number