Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
This bundle performs validations of a form in javascript. (i18n compatible and several javascript frameworks supported)
PHP
Branch: master
Pull request Compare This branch is 1 commit ahead, 38 commits behind Abhoryo:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
CacheWarmer
Controller
DependencyInjection
EventListener
Form/Extension
Generator
Resources
Tests
Twig/Extension
.gitignore
.travis.yml
APYJsFormValidationBundle.php
ChangeLog.md
Contributors.md
JsfvEvents.php
LICENSE
README.md
composer.json
phpunit.xml.dist

README.md

Getting Started With JsFormValidationBundle

Version: 2.1 Build Status

Compatibility: Symfony 2.1+

This bundle generate automatically a script to perform validations of a form in javascript.

It use the same constraints defined with annotations in your entity or your document.

This bundle is g11n compatible.(i18n + L10n)

Prerequisite

Installation

Please follow the steps given here to install this bundle.

Usage

This bundle is really easy to use. All you need is to call a twig function in your template.

{{ JSFV(form) }}

Template of a simple form:

<!-- MyProjectMyBundle:Default:index.html.twig -->

<!-- Include prerequisite librairies and bundles -->
<script type="text/javascript" src="__YOUR_FRAMEWORK_URL__"></script>
<script type="text/javascript" src="{{ asset('bundles/bazingaexposetranslation/js/translator.min.js') }}"></script>
<script type="text/javascript" src="{{ url('bazinga_exposetranslation_js', { 'domain_name': 'validators' }) }}"></script>

<!-- Call JsFormValidationBundle -->
{{ JSFV(form) }}

<!-- Display the form -->
<form action="{{ path('myform') }}" method="post" {{ form_enctype(form) }}>
    {{ form_widget(form) }}
    <input type="submit" />
</form>

-See a full simple example here.

The following documents are available:

TODO

  • Script all possible constraints
  • Manage php, yml and xml defined constraints
Something went wrong with that request. Please try again.