Difference between revisions of "Form validation/en"
From Joomla! Documentation
(Importing a new version from external source) |
(Updating to match new version of source page) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude><languages /></noinclude> | <noinclude><languages /></noinclude> | ||
Joomla has client-side and server-side form validation capabilities.<br/> | Joomla has client-side and server-side form validation capabilities.<br/> | ||
− | Server side validation is | + | Server side validation is essential since everything before that can be overridden on the user side by hackers. However client-side is the most user-friendly validation, so using both is considered best practice. |
==Client-side validation== | ==Client-side validation== | ||
Line 11: | Line 11: | ||
==Server-side validation== | ==Server-side validation== | ||
.. is done after having submitted the form and will normally return to the form when not validated with some extra messages. <br/> | .. is done after having submitted the form and will normally return to the form when not validated with some extra messages. <br/> | ||
− | It | + | It uses the HTML '''attributes''' <u>required</u> ("true" or "required") and <u>validate</u> (with value being a joomla or custom rule; e.g. validate="email") |
− | More here: [[S:MyLanguage/Server-side form validation|Server-side form validation]] | + | More here: [[S:MyLanguage/J3.x:Server-side form validation|Server-side form validation]] |
<noinclude> | <noinclude> |
Latest revision as of 09:33, 31 March 2020
Joomla has client-side and server-side form validation capabilities.
Server side validation is essential since everything before that can be overridden on the user side by hackers. However client-side is the most user-friendly validation, so using both is considered best practice.
Client-side validation
.. is done via javascript while the user is filling in the form fields.
It uses the HTML classes required and validate-[xxx] (with [xxx] being a joomla or custom rule; e.g. validate-numeric)
More here: Client-side form validation
Server-side validation
.. is done after having submitted the form and will normally return to the form when not validated with some extra messages.
It uses the HTML attributes required ("true" or "required") and validate (with value being a joomla or custom rule; e.g. validate="email")
More here: Server-side form validation