Download the PHP package bic/form-validation without Composer
On this page you can find all versions of the php package bic/form-validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bic/form-validation
More information about bic/form-validation
Files in bic/form-validation
Package form-validation
Short Description Let's take the form validation logic and apply it for js, other php scripts, an API...
License MIT
Homepage https://github.com/bichotll/FormValidationBundle
Informations about the package form-validation
FormValidationBundle
The objective of this bundle is to create a abstract and generic object of the form information to parse it to another tools (Javascript or maybe PHP tools).
For instance: It can help you to addapt this information to javascript validation logic for the forms.
Dependencies
Check composer.json of the current version.
Instalation
Composer
Enable the bundle
How it works
Create the form
Extract the validation
Return it to the view
And do whatever you want with it.
json form example
Full example
Last changes
- Added entity results from the FormView object (dataEntityChoice property)
- Added JMS Serializer as dependency to get the entity type value and parse it to json
- Added value property. It has the value of the field.
- Removed the possibility to get the class name from the data passed
- Provide better and complete json example (from TODO)
- Create associated js parsers like ParsleyJs and js form generator script. (Out of project) (from TODO)
- FIXED - Does not work with complex forms. (from Known errors)
- More unit testing (from TODO)
- General info of form added
- Created first unit testing to check the bundle is working with complex forms
- Fix known errors (from TODO)
- Parent forms not avoided
- Submit buttons not avoided
- Added more form information
- Removed jQValidation generator
- Removed generator folder and strategy. Now the parsers will be aplied externally.
Related resources
Js form creator
It creates the form from the json information. https://github.com/bichotll/Symfony-FormValidationBundle-js-parser
Js ParsleyJS parser
It applies the ParsleyJS validation from the Symfony-FormValidationBundle-js-parser form object or existing one using FormValidationBundle object https://github.com/bichotll/Symfony-FormValidationBundle-ParsleyJS-parser
Wiki
How to test it Full example
TODO
- Proper unit test. Until the next change I will not check the responses programatically.
- Unit test using a mock of container, etc.
- Test entity type.
All versions of form-validation with dependencies
symfony/framework-bundle Version >=2.3.0
symfony/validator Version >=2.3.0
symfony/form Version >=2.3.0
jms/serializer-bundle Version >=0.11