Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Form Js Validation Bundle

Form Js Validation Bundle Laravel Package

acseo/form-js-validation-bundle

Symfony bundle that adds client-side JavaScript validation to Symfony forms. Choose between formvalidation.io or jqueryvalidation.org, enable the service in parameters.yml, call addJsValidation() in controllers, and initialize validation in your Twig template.

View on GitHub
Deep Wiki
Context7

Symfony Form Js Validation Bundle

Frequently asked questions about Form Js Validation Bundle
Does this package work with Laravel or only Symfony?
This package is designed for Symfony, not Laravel. Laravel developers should explore alternatives like Laravel's built-in form validation with JavaScript libraries (e.g., Vue Formulate, VeeValidate) or Symfony UX components if using Symfony-based Laravel apps.
Will this bundle work with Symfony 6.x or 7.x?
No, the last release was in 2017 and assumes Symfony 3/4 architecture (e.g., AppKernel.php, parameters.yml). You’d need to fork and update it for Symfony 6+ by replacing AppKernel registration with `config/bundles.php` and migrating parameters to YAML/environment variables.
How do I install and enable client-side validation?
Run `composer require acseo/form-js-validation-bundle`, register the bundle in `AppKernel.php`, and set your preferred validator (FormValidation.io or jQuery) in `parameters.yml`. Then call `$form = $this->get('acseo_form_js_validation.service')->addJsValidation($form)` in your controller.
Can I use this with PHP 8.x?
No, the bundle is untested with PHP 8.x. Potential issues include deprecated functions, named arguments, or strict typing. A fork would need to add `return_type_declaration` and `strict_types` declarations and test compatibility.
Does this support custom form types or nested forms?
The bundle leverages Symfony’s form constraints, so it should work with custom form types. However, nested forms or dynamic fields may require additional JavaScript logic, as the bundle lacks recent testing for edge cases.
What if I need server-side validation as a fallback?
This bundle only adds client-side validation. Symfony’s default server-side validation remains active, so you’ll still need to handle form submission in your controller (e.g., `$form->handleRequest($request)`).
Are there alternatives for modern Symfony/Laravel apps?
For Symfony, consider Symfony UX (Stimulus + Alpine.js) or libraries like Formo. For Laravel, use Laravel Validation with JavaScript libraries like VeeValidate (Vue) or Alpine.js for reactive forms. Avoid this bundle if you’re on Symfony 6+ or need SPA support.
How do I initialize validation in Twig templates?
Wrap your form in `form_start` with an `id` attribute, then add a `<script>` block in Twig to initialize the validator. For FormValidation.io, use `data-fv-framework`; for jQuery, call `$('#form_id').validate()`. Example provided in the README.
Will this bundle conflict with other jQuery plugins?
Yes, if you’re using jQuery Validation, conflicts may arise with other jQuery plugins (e.g., DataTables, Select2). Test thoroughly in your environment, or use FormValidation.io to avoid jQuery dependencies.
Is this bundle actively maintained or secure?
No, the last release was in 2017, and it lacks dependents or recent updates. Security vulnerabilities in FormValidation.io or jQuery Validation won’t be patched by the bundle. Use at your own risk or fork it for maintenance.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai