Validating user input on the server side
Client validation usually detects and helps fix most user input errors in a web application. But for client validation to work, we fully rely on our user’s browser. Client validation in Joomla! is accomplished using the new features in the HTML5 standard and some JavaScript libraries, and there is a chance that our users work with an old browser or have disabled JavaScript in their browser configuration. In any of these situations, the client validation will not work as expected and we need to set another validation method that does not depend on the user’s browser.
In Joomla!, we can add server-side validation directly in our form definition, as we did for client-side validation.
Back to our edit client form, we can edit the src/component/admin/forms/client.xml
file and replace the email field definition with the following code:
<field name="email" type="...