formapro / JsFormValidatorBundle

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

`_csrf_token` causes issues on auth form #162

Closed matthewnessworthy closed 3 years ago

matthewnessworthy commented 4 years ago

https://github.com/formapro/JsFormValidatorBundle/blob/df5a8b3711c210ebc8f1acf343e06233e2c44d3f/src/Factory/JsFormValidatorFactory.php#L202

Uncaught TypeError: Cannot read property 'domNode' of null
    at Object.findFormElement (FpJsFormValidator.js:764)
    at Object.initModel (FpJsFormValidator.js:410)
    at FpJsFormValidator.js:387
    at HTMLDocument.<anonymous> (FpJsFormValidator.js:401)

this appears to happen with the _csrf_token field present in the login form

the likely solution would be to exclude this field by default