Edit customer accepts dot in phone number

This commit is contained in:
Vins 2024-05-31 15:18:18 +02:00
parent 6dba349c94
commit 8100e77480

View File

@ -179,6 +179,7 @@ class UpdateClientClass extends BasePage<IPropsClass, IState> {
if (!values["cell_phone_number"]) return; if (!values["cell_phone_number"]) return;
// 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);