1b.app
Link copied -

Improve phone number validator

Here in the ordering https://chekhol.com.ua/basket/
There should be such alerts if the phone number is invalid (Fig. 1, Fig. 2, Fig. 3). It is also important that the alerts are displayed both when you type and when you copy-paste (focus).
The text "Enter a valid phone number" - color #ef9f8d, in size that would not go to the 2nd line (about 10px).
Icon - ⚠️ font-size: 20px, Color #ef9f8d
Also, you need to correct the form so that the default would be "+38", and there were no brackets in the mask itself, so that the format would be "+38 093 344 73 72".
And the most important point is that when inserting a phone number or autofilling, the form does not "absorb" numbers, because now if, roughly speaking, insert the number "0933447372", we will get "+38 (093) 3" as a result. It is necessary that the phone does not cut off, and if the phone does not fit the mask, then it continues after "+38", that is, it is supplemented
Original question is available on version: ru

Answers:

1. Validators are triggered when the form is submitted. You want that at any change of this field worked?
2. 1h

Tretyak Artur
OneBox Insiders wrote:
And the most important point is that when inserting a phone number or autofilling, the form does not "absorb" numbers, because now if, roughly speaking, insert the number "0933447372", we will get "+38 (093) 3" as a result. It is necessary that the phone does not cut off, and if the phone does not fit the mask, then it continues after "+38", that is, it is supplemented. At the same time, the validity check should also take place during copy-paste.

didn't understand here
12.09.2022, 11:31
Original comment available on version: ru

In summary, what we do: for any change in the field, we do validation. If the validation fails, we highlight it, but let's place the order anyway. 2 hours for everything
12.09.2022, 11:42
Original comment available on version: ru

if the number is longer or shorter than 12 characters, we still do not cut it off and put it in the order.
12.09.2022, 11:43
Original comment available on version: ru



Everything works, but there is one caveat when autofilling for some reason is limited to the phone number https://take.ms/RJwQD
Or ctrl + c 380501234567 ctrl + v
16.09.2022, 15:35
Original comment available on version: ru

If you insert in this format - 0501234567 - is it normal?
16.09.2022, 15:51
Original comment available on version: ru


Derkach Dmytriy wrote:
0501234567

Norm. But if 380501234567 - then it is cut off
16.09.2022, 15:59
Original comment available on version: ru


Tretyak Artur
OneBox Insiders wrote:

Derkach Dmytriy wrote:
0501234567

Norm. But if 380501234567 - then it is cut off

I will correct
16.09.2022, 19:39
Original comment available on version: ru


Tretyak Artur
OneBox Insiders wrote:

Derkach Dmytriy wrote:
0501234567

Norm. But if 380501234567 - then it is cut off

Corrected. Check Now
20.09.2022, 12:29
Original comment available on version: ru


Derkach Dmytriy wrote:

Tretyak Artur
OneBox Insiders wrote:

Derkach Dmytriy wrote:
0501234567

Norm. But if 380501234567 - then it is cut off

Corrected. Check Now

It seems ok, but there is another problem :))
For some reason, when autofilling from an android, part of the phone number is cut off anyway. On idea even at any autocomplete. Can you please see what is wrong?
18.10.2022, 11:40
Original comment available on version: ru


Derkach Dmytriy wrote:

Tretyak Artur
OneBox Insiders wrote:

Derkach Dmytriy wrote:
0501234567

Norm. But if 380501234567 - then it is cut off

Corrected. Check Now

?
20.10.2022, 17:50
Original comment available on version: ru



Derkach Dmytriy wrote:
I will check

It doesn't work (
02.11.2022, 12:01
Original comment available on version: ru

autocomplete uses a different event than the insert
looking for a solution how to fix the mask for the data type
03.11.2022, 20:38
Original comment available on version: ru


Derkach Dmytriy wrote:
autocomplete uses a different event than the insert
looking for a solution how to fix the mask for the data type

Is there any solution?
16.11.2022, 16:32
Original comment available on version: ru


Derkach Dmytriy wrote:
autocomplete uses a different event than the insert
looking for a solution how to fix the mask for the data type

Hello. When will there be a decision?
Already on fire.
05.12.2022, 14:37
Original comment available on version: ru

I'm working on it. The topic is in my tack, so I haven't forgotten about it.
05.12.2022, 14:53
Original comment available on version: ru


Derkach Dmytriy wrote:
I'm working on it. The topic is in my tack, so I haven't forgotten about it.

Good, looking forward to it
05.12.2022, 17:04
Original comment available on version: ru

Corrected. It will insert normally. Expect an update
12.01.2023, 17:23
Original comment available on version: ru

Updated. Check (just clear your browser cache)
12.01.2023, 18:50
Original comment available on version: ru

Now it works as it should?
16.01.2023, 14:09
Original comment available on version: ru


Derkach Dmytriy wrote:
Now it works as it should?

It seems yes, if anything, let's create a separate task. Thank you very much <3
16.01.2023, 14:15
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment