Z
Z
zekhe2014-10-31 17:04:18
JavaScript
zekhe, 2014-10-31 17:04:18

How to implement protection in the order form for a certain number of characters?

How to implement so that the order is carried out when dialing a certain number of digits in the form "Your phone" - no more no less, with an incorrect set with an error "Enter a 10-digit phone number"? Like in the screenshot prntscr.com/51lken .
JS source code can be provided

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita Lubchich, 2014-10-31
@Cybran

A little offtopic, but you should implement protection against incorrect data on the server side (and only then, for the sake of page responsiveness, do it on the front-end), since someone can forge a request and send invalid data.
Related: www.w3resource.com/javascript/form/phone-no-validation.php
PS The page looks bad.

Z
zekhe, 2014-10-31
@zekhe

On the server side, it is unlikely to be realized. this is not my landing page, but a trading platform. I am given to adjust index, JS, CSS. But you can try asking them.
And how to attach this particular script www.w3resource.com/javascript/form/phone-no-validation.php to my landing page?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question