Download the PHP package fp/jsformvalidator-bundle without Composer

On this page you can find all versions of the php package fp/jsformvalidator-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package jsformvalidator-bundle

FpJsFormValidatorBundle

Build Status Total Downloads

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

If you have Symfony 4.* - you need to use Version 1.6.x-dev

If you have Symfony 3.1. - you need to use [Version 1.5.](https://github.com/formapro/JsFormValidatorBundle/tree/1.5)

If you have Symfony 3.0. - you need to use [Version 1.4.](https://github.com/formapro/JsFormValidatorBundle/tree/1.4)

If you have Symfony 2.8. or 2.7. - you need to use Version 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.1 Download FpJsFormValidatorBundle using composer

Run in terminal:

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

1.2 Enable javascript libraries

There are two ways to initialize javascript's files for this library. You can create a new entry in the webpack or import the main file into your javascript.

1.2.1 Add FpJsFormValidatorBundle to webpack.config.js

And include new entry in your template

1.2.2 Import FpJsFormValidatorBundle in your main javascript

1.2.3 Use inits in your template

1.4 Add routes

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

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

2 Usage

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

  1. If you need to initialize JS validation for your forms separately, or by some event, in this case you need to follow chapter 1.3

3 Customization

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.

  1. Disable validation for a specified field
  2. Error display
  3. Get validation groups from a closure
  4. Getters validation
  5. The Callback constraint
  6. The Choice constraint. How to get the choices list from a callback
  7. Custom constraints
  8. Custom data transformers
  9. Checking the uniqueness of entities
  10. Form submit by Javasrcipt
  11. onValidate callback
  12. Run validation on custom event
  13. Collections validation

All versions of jsformvalidator-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
symfony/form Version ^2.7|^3.0|^4.0
symfony/validator Version ^2.7|^3.0|^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fp/jsformvalidator-bundle contains the following files

Loading the files please wait ....