Download the PHP package apy/jsfv-bundle without Composer
On this page you can find all versions of the php package apy/jsfv-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download apy/jsfv-bundle
More information about apy/jsfv-bundle
Files in apy/jsfv-bundle
Package jsfv-bundle
Short Description Symfony2 Javascript Form Validation Bundle with localisation support
License MIT
Homepage https://github.com/Abhoryo/APYJsFormValidationBundle
Informations about the package jsfv-bundle
This Bundle is no longer maintained.
Over the years, the structure of Symfony forms has evolved and this bundle has tried to follow its evolution without changing its own structure. However, this old structure is not adapted to new versions of Symfony.
Instead of starting from scratch and generate code similar to another Bundle, I'd rather advise you to use this other Bundle.
Changes to use this Bundle are really fast to apply.
It was a real pleasure to offer this kind of bundle for early versions of Symfony.
Getting Started With JsFormValidationBundle
Compatibility: Symfony >=2.1, <2.4.
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
- BazingaExposeTranslationBundle is mandatory (<2.0). This bundle compute and translate messages in javascript.
- A JavaScript framework is recommended. jQuery, Mootools, Prototype, Yui, Dojo, Zepto and ExtJs are already supported. (Create an issue if you want other)
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:
- Installation
- Simple Example
- Custom Constraints
- Twig Function
- Configuration
- Assets warmer
- Events
- Overriding the bundle
- Constraints warning
- Reporting a Bug
TODO
- Script all possible constraints
- Manage php, yml and xml defined constraints
All versions of jsfv-bundle with dependencies
symfony/framework-bundle Version ~2.1
symfony/form Version ~2.1
willdurand/js-translation-bundle Version 1.2.*