<html> <head> </head> <body> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script type="text/javascript"> window.onload = function(){ $("#form").validate({ rules: { 'phonenumber': { required: true, minlength: 10 } } }); }); </script> <form action="order.php" method="post" id="form"> Your phone number : <input name="phonenumber" type="text" id='phonenumber' maxlength="10" autocomplete="off" onkeypress='return event.charCode >= 48 && event.charCode <= 57' placeholder="phonenumber"> <input type="submit" /> </form> </body> </html>
http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.min.js
)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)