netzmacht / contao-form-validation
Javascript form validation.
Installs: 38
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 0
Open Issues: 1
Type:contao-module
Requires
Requires (Dev)
This package is auto-updated.
Last update: 2024-12-06 10:15:49 UTC
README
This extension provides extended form validations like client side form validation for the Contao forms.
Features
- 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.
Install
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.