Form Validation in Joomla - with MooTools 1.2

  • PDF

MooTools Form Validation

Part II

In the original tutorial, we worked through how to add the built in MooTools validation tool - this uses version 1.12 of MooTools.  Great for out the box browser side validation - however, MooTools version 1.2 has a 'validator' extension for forms that will further simplify our coding.  This brief tutorial will step through how to use the new validation on your Joomla website.

The first step is to enable the Joomla! plugin "System - Mootools Upgrade" available starting with Joomla! version 1.5.19.

Next you will need to include the MooTools 'More' validation classes - go to this link and select:

  • Form.Validator
  • Form.Validator.Inline
  • Form.Validator.Extras

Additional items will be automatically added and then you can download - you have the option of selecting a compressor - for production I recommend using YUI.  And has stated online - use 'no compresion' when testing.

For referring to our validator script within our code we'll need to use