This extension provides extended form validations like client side form validation for the Contao forms.
- Client side form validation using http://formvalidation.io/. This is an commercial library supporting well known frameworks like Bootstrap, foundation. It is NOT included in this extension and has to be purchased and installed by its own.
- formvalidation.io supports html5 form validation. Since Contao supports html5 form field widgets most validators work out of the box.
- Automatically create frontend validators for:
- upload file (extensions and file size)
- password (min length of password field, compare passwords)
- date formats (date, datim)
- phone validator (formvalidation.io does not support input type tel.).
- string length validation (min length, max length)
Following features are planned:
- Support default Contao 3.4 form syntax
- Provide extended validators for client and server side.
You can install this extension using composer:
$ php composer.phar require netzmacht/contao-form-validation:~2.0
After installing, do following steps:
- Set the assets path to the http://formvalidation.io/ library in System settings -> form validation
- Create a form validation config in the form generator.
- Edit the form setting and activate client side validation. Select the configuration here.
- Edit the form fields and customize the client side validation config.