Phone number input with dot ok

This commit is contained in:
Vins 2024-05-23 10:49:46 +02:00
parent 724b29f944
commit 6536637929

View File

@ -231,6 +231,7 @@ class AddClientToFolderClass extends BasePage<IPropsClass, IState> {
try { try {
// remove every space from the phone number // remove every space from the phone number
values["cell_phone_number"] = values["cell_phone_number"].replace(/\s/g, ""); values["cell_phone_number"] = values["cell_phone_number"].replace(/\s/g, "");
values["cell_phone_number"] = values["cell_phone_number"].replace(/\./g, "");
if (values["cell_phone_number"] && values["cell_phone_number"].length === 10) { if (values["cell_phone_number"] && values["cell_phone_number"].length === 10) {
// get the first digit of the phone number // get the first digit of the phone number
const firstDigit = values["cell_phone_number"].charAt(0); const firstDigit = values["cell_phone_number"].charAt(0);