PHPackages                             massil/jsformvalidator-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. massil/jsformvalidator-bundle

ActiveSymfony-bundle[Validation &amp; Sanitization](/categories/validation)

massil/jsformvalidator-bundle
=============================

Javascript validation for sf2 forms.

1.4.0(10y ago)018MITPHPPHP &gt;=5.3.2

Since Dec 9Pushed 10y ago1 watchersCompare

[ Source](https://github.com/massil31/JsFormValidatorBundle)[ Packagist](https://packagist.org/packages/massil/jsformvalidator-bundle)[ Docs](https://github.com/formapro/JsFormValidatorBundle)[ RSS](/packages/massil-jsformvalidator-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (12)Versions (18)Used By (0)

FpJsFormValidatorBundle
=======================

[](#fpjsformvalidatorbundle)

[![Build Status](https://camo.githubusercontent.com/fcd873b3259e0940bec78a163fcd57a2b017d2ed5ad37ba3494e1f279720d5ee/68747470733a2f2f7472617669732d63692e6f72672f666f726d6170726f2f4a73466f726d56616c696461746f7242756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/formapro/JsFormValidatorBundle)[![Total Downloads](https://camo.githubusercontent.com/3a82a434f0bc68e0244e7393f2210342e6d11c68b06c0ca062501b5a962abbe7/68747470733a2f2f706f7365722e707567782e6f72672f66702f6a73666f726d76616c696461746f722d62756e646c652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/fp/jsformvalidator-bundle)

This module enables validation of the Symfony 3 forms on the JavaScript side. It converts form type constraints into JavaScript validation rules.

If you have Symfony 2.8.\* or 2.7.\* - you need to use [Version 1.3.\*](https://github.com/formapro/JsFormValidatorBundle/tree/1.3)If you have Symfony 2.6.\* or less - you need to use [Version 1.2.\*](https://github.com/formapro/JsFormValidatorBundle/tree/1.2)

1 Installation
---------------------------------------------

[](#1-installation)

### 1.1 Download FpJsFormValidatorBundle using composer

[](#11-download-fpjsformvalidatorbundle-using-composer)

Run in terminal:

```
$ php composer.phar require "fp/jsformvalidator-bundle":"dev-master"
```

Or if you do not want to unexpected problems better to use exact version.

```
$ php composer.phar require "fp/jsformvalidator-bundle":"v1.4.*"
```

### 1.2 Enable the bundle

[](#12-enable-the-bundle)

Enable the bundle:

```
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Fp\JsFormValidatorBundle\FpJsFormValidatorBundle(),
    );
}
```

### 1.3 Enable javascript libraries

[](#13-enable-javascript-libraries)

```

        {{ include('FpJsFormValidatorBundle::javascripts.html.twig') }}

```

### 1.4 Add routes

[](#14-add-routes)

If you use the UniqueEntity constraint, then you have to include the next part to your routing config: app/config/routing.yml

```
# ...
fp_js_form_validator:
    resource: "@FpJsFormValidatorBundle/Resources/config/routing.xml"
    prefix: /fp_js_form_validator
```

Make sure that your security settings do not prevent these routes.

2 Usage
--------------------------------------

[](#2-usage)

After the previous steps the javascript validation will be enabled automatically for all your forms.

1. [Disabling validation](Resources/doc/2_1.md)
2. [If your forms are placed in sub-requests](Resources/doc/2_2.md)
3. If you need to initialize JS validation for your forms separately, or by some event, in this case you need to follow [these steps](Resources/doc/2_3.md) instead of the [chapter 1.3](#p_1_3)

3 Customization
----------------------------------------------

[](#3-customization)

### Preface

[](#preface)

This bundle finds related DOM elements for each element of a symfony form and attach to it a special object-validator. This object contains list of properties and methods which fully define the validation process for the related form element. And some of those properties and methods can be changed to customize the validation process.

If you render forms with a some level of customization - read [this note](Resources/doc/3_0.md).

1. [Disable validation for a specified field](Resources/doc/3_1.md)
2. [Error display](Resources/doc/3_2.md)
3. [Get validation groups from a closure](Resources/doc/3_3.md)
4. [Getters validation](Resources/doc/3_4.md)
5. [The Callback constraint](Resources/doc/3_5.md)
6. [The Choice constraint. How to get the choices list from a callback](Resources/doc/3_6.md)
7. [Custom constraints](Resources/doc/3_7.md)
8. [Custom data transformers](Resources/doc/3_8.md)
9. [Checking the uniqueness of entities](Resources/doc/3_9.md)
10. [Form submit by Javasrcipt](Resources/doc/3_10.md)
11. [onValidate callback](Resources/doc/3_11.md)
12. [Run validation on custom event](Resources/doc/3_12.md)
13. [Collections validation](Resources/doc/3_13.md)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 60.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~56 days

Recently: every ~0 days

Total

16

Last Release

3700d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/80074eaf10f949547a8f0b7c078de190d474ae20b4b85c2e0c04aa02fb9b3241?d=identicon)[massil31](/maintainers/massil31)

---

Top Contributors

[![66Ton99](https://avatars.githubusercontent.com/u/383739?v=4)](https://github.com/66Ton99 "66Ton99 (40 commits)")[![sustmi](https://avatars.githubusercontent.com/u/885946?v=4)](https://github.com/sustmi "sustmi (7 commits)")[![asentner](https://avatars.githubusercontent.com/u/2752040?v=4)](https://github.com/asentner "asentner (5 commits)")[![manuelj555](https://avatars.githubusercontent.com/u/1214013?v=4)](https://github.com/manuelj555 "manuelj555 (4 commits)")[![massil31](https://avatars.githubusercontent.com/u/6408297?v=4)](https://github.com/massil31 "massil31 (2 commits)")[![hanneskaeufler](https://avatars.githubusercontent.com/u/68024?v=4)](https://github.com/hanneskaeufler "hanneskaeufler (2 commits)")[![tools4origins](https://avatars.githubusercontent.com/u/8068386?v=4)](https://github.com/tools4origins "tools4origins (2 commits)")[![maarekj](https://avatars.githubusercontent.com/u/1654977?v=4)](https://github.com/maarekj "maarekj (1 commits)")[![benr77](https://avatars.githubusercontent.com/u/2156742?v=4)](https://github.com/benr77 "benr77 (1 commits)")[![VaclavSir](https://avatars.githubusercontent.com/u/1473642?v=4)](https://github.com/VaclavSir "VaclavSir (1 commits)")[![maryo](https://avatars.githubusercontent.com/u/900769?v=4)](https://github.com/maryo "maryo (1 commits)")

---

Tags

symfonyvalidationjavascriptform

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/massil-jsformvalidator-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/massil-jsformvalidator-bundle/health.svg)](https://phpackages.com/packages/massil-jsformvalidator-bundle)
```

###  Alternatives

[fp/jsformvalidator-bundle

Javascript validation for sf\[2|3|4\] forms.

132418.8k1](/packages/fp-jsformvalidator-bundle)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[apy/jsfv-bundle

Symfony2 Javascript Form Validation Bundle with localisation support

92770.5k](/packages/apy-jsfv-bundle)[barbieswimcrew/zip-code-validator

Constraint class for international zipcode validation

772.3M](/packages/barbieswimcrew-zip-code-validator)[karser/karser-recaptcha3-bundle

Google ReCAPTCHA v3 for Symfony

1862.4M7](/packages/karser-karser-recaptcha3-bundle)[boekkooi/jquery-validation-bundle

Jquery form validation bundle for symfony 2

2773.9k1](/packages/boekkooi-jquery-validation-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
