Hi, I want to add some simple validation to the form.
There are 2 text fields in which the user must enter only numbers and must be greater than zero. The jquery code is in its own file (the form consists of html / jquery / php). The first number is for "previous age" and the second number is for "current age". For example, if the user enters “0” in any text field, a warning or message box appears informing them that they need to enter a number greater than zero. Everything except the number greater than zero entered in the text field should contain a warning message.
As a note, the .php file is only used for calculation / math after the user clears the form requirements.
If someone could give a clear and concise example, this would be greatly appreciated. I tried to find a suitable example using a search on Google, but nothing seemed suitable. I also try to avoid using the validator plugin, which seemed to be supposed to answer a search related question. I have my reasons, and we will be happy to explain if necessary.
Thank you Charles
source
share