I tried to use JQuery Validation. That is the easiest form validation library!!!!!
I just need to include the jquery library and its js file. Then I add these code in $(document).ready
This is the validation rule.
I think that is easier to explain in an example.
I got a form like this:
Then I just need add those code in $(document).ready
Then the form will be validated when the user submits the data.