Giter VIP home page Giter VIP logo

contao-form-validation's Introduction

Contao form validation extension

Build Status Version License Downloads Contao Community Alliance coding standard

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:

  1. Set the assets path to the http://formvalidation.io/ library in System settings -> form validation
  2. Create a form validation config in the form generator.
  3. Edit the form setting and activate client side validation. Select the configuration here.
  4. Edit the form fields and customize the client side validation config.

contao-form-validation's People

Contributors

dmolineus avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

contao-form-validation's Issues

Include bootstrap manually - scripts from /dist not loaded

In your manual you wrote:
Set the assets path to the http://formvalidation.io/ library in System settings -> form validation

Actually my form is not validating. There are some things I don't understand:

  • The directory /dist which comes from formvalidation.io doesn't have included the bootstrap framework (bootstrap.min.css & bootstrap.min.js). That means I have to include this files manually?

  • I have entered the path for /dist directory in contao settings, I can find the CSS Code from formValidation.css in the collection.css but I can't find the code from formValidation.js neither in the collection.js nor elsewhere in the source code.

  • I already had installed contao-bootstrap/form, so this should provide a bootstrap HTML-Layout for the form. But this is not in the dependencies of contao-form-validation listed - do I need this?

Maybe you can help me, thank you very much!

Support regex validation

As for example the email validation differes between Contao and form validation there should be an option to support at least custom regex validators.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.