Introduction: In Today's Post I will explain how to do Validation with Jquery for Emailid, Phone number, numbers, Decimal and Required in single generic code.
Post: Client side validation is the most common process in any web site. Even though we have jQuery form validation plugin also. But the issue we faced with this plugin is that We have to write separate code to validate every form. So I decided to something generic that I can write once and not need to think about client side validation part. Luckily jQuery provide us option to do this easily.
One single code will validate the complete site. In the current post, I will validation only for required, email, phone number, and decimal values. With a little code of jQuery and some CSS, we can do it.
In the last post of jquery, we learn how to create a generic jquery code to validation complete site. Now will learn how to Delay function or Method execution for some time with SetTimOut Function after Jquery ready method.
Sometimes we have to delay execution of the method for some time or want to execute method continuously after a fix time interval using java script. i.e. want to create clock or do a service call. In any of these situations, we will user java script setTimeOut function.
When requesting sensitive information from the end user such as passwords, credit card details, and transaction pin numbers used in Internet banking, etc. it is preferred that the web user keys in the characters manually rather than pasting from the clipboard.
You can disable cut, copy and paste by simply writing small peace of code by jQuery.
In previous post of jquery we see how can we validate complete website with a single code of jquery and how can we delay execution of methods with java script