表单校验
From Joomla! Documentation
Joomla的表单验证包括客户端和服务端。服务器端是必须要有的,这样能够确保你的数据是经过校验的,因为用户端的数据总是不可信的。客户端虽然不能够百分百的保证数据的有效性,但是它对于改善用户体验是非常有帮助的。因此,我们强烈建议你将两端都实现校验。
客户端校验
.. 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