D
D
Dadad2020-04-19 14:31:23
PHP
Dadad, 2020-04-19 14:31:23

How to make a verification: mail or phone?

Is it possible to do this so that it checks what the user entered: mail or phone. And all this in one input. And so that what he entered is saved in the browser as a login. If possible, how to implement it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Sarvarov, 2020-04-19
@Dadad

It seems to me that it is better to do validation on the Backend side (especially if you later save something in the database).
To do validation via jQuery, it will be convenient to use this plugin - https://jqueryvalidation.org/.
If without it then:
https://codepen.io/roman-sarwarow/pen/PoPzxoV

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question