Here's how to use it:
Enter the following code at the top of the page where you want to use the form feature:
Jhtml::_ (' behavior.formvalidation ');
Then add the following script to the page
Copy the Code code as follows:
Modify the code at the position of the form
Copy the Code code as follows:
Custom Validation methods:
The Joomla verification feature supports customization and can set up infrequently used validation rules.
For example, I want to make a password entry plus a confirmation password entry, two input box values are equal to submit, you can add the following script
Copy the Code code as follows:
Document.formvalidator.setHandler (' passverify ', function (value) {return ($ (' password '). Value = = value);});
The above describes the Joomla forum Joomla built-in form validation features, including the Joomla forum content, I hope that the PHP tutorial interested in a friend helpful.