Developed with love by KnpLabs Hire us for your project!
109

APYJsFormValidationBundle

by Abhoryo

This bundle performs validations of a form in javascript. (i18n compatible and several javascript frameworks supported)

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.

fp/jsformvalidator-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

Version: 2.1
Build Status

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

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
Copyright (c) 2011-2013 Abhoryo

The MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Merge pull request #56 from riskawarrior/master
    By Abhoryo, 3 years ago
  • Changed the name of ExposeTranslationBundle
    By Riskawarrior, 3 years ago
  • This Bundle is no longer maintained
    By Abhoryo, 3 years ago
  • Update composer.json
    By Abhoryo, 3 years ago
  • Update simple_example.md
    By Abhoryo, 3 years ago
  • Fix range validator
    By recipe, 3 years ago
  • Merge pull request #47 from lsmith77/patch-1
    By Abhoryo, 3 years ago
  • minor typo
    By lsmith77, 3 years ago
  • Merge pull request #46 from lsmith77/travis
    By Abhoryo, 3 years ago
  • cleanup dependencies and dev requirements
    By lsmith77, 3 years ago
  • remove redundant LICENSE
    By lsmith77, 3 years ago
  • Fix. Avoids bug with translation.
    By recipe, 3 years ago
  • Merge pull request #43 from 66Ton99/issue-20
    By recipe, 3 years ago
  • Fixed test
    By 66Ton99, 3 years ago
  • Fixed bug
    By 66Ton99, 3 years ago
  • Fixed Issue #20
    By 66Ton99, 3 years ago
  • Update configuration.md
    By recipe, 3 years ago
  • Merge pull request #42 from Tobur/master
    By recipe, 3 years ago
  • Fix test
    By Tobur, 3 years ago
  • Add unit test for emvedded form functional
    By Tobur, 3 years ago
  • Rename AnnotationLoaderApy.php to AnnotationLoader.php
    By Tobur, 3 years ago
  • Implements functionality for symfony embedded form. Creates fix for
    By Tobur, 3 years ago
  • Update .travis.yml
    By recipe, 4 years ago
  • removed php5.5 from .travis.yml
    By recipe, 4 years ago
  • Fix. auto_initialize does not exist for SF<2.3
    By recipe, 4 years ago
  • Fix travis install.
    By recipe, 4 years ago
  • Fix. Travis does not use correct symfony version.
    By recipe, 4 years ago
  • Update composer.json
    By recipe, 4 years ago
  • Merge branch 'master' of git://github.com/Abhoryo/APYJsFormValidationBundle
    By recipe, 4 years ago
  • Fix. phpunit tests.
    By recipe, 4 years ago