formapro / JsFormValidatorBundle

The Javascript validation for Symfony 2, 3 and 4 forms
MIT License
128 stars 57 forks source link

Validation not work for pages loaded by Barba.js #164

Open gvojtko opened 3 years ago

gvojtko commented 3 years ago

I use Barba.js for dynamic page transitions. Validation does not work for forms that are loaded dynamically. The model is generated correctly, but the validator is not initialized. Is it possible to initialize the validator manually after a completely loaded page?

gvojtko commented 3 years ago

Solved! I created a callback js method for each form in twig template, which I later call in barba.js.