Closed martinjinda closed 5 years ago
I'm using form validation with webpack this is how my main.js looks like, but none of the listed options doesn't work me. Is there anyone who use it with webpack as well? Or what I do wrong?
main.js
Validation works fine, but without the custom options.
import 'jquery'; import 'bootstrap'; import LiveFormValidation from 'live-form-validation-es6'; window.LiveForm = LiveFormValidation.LiveForm; window.Nette = LiveFormValidation.Nette; import 'nette.ajax.js'; $(function() { window.Nette.init(); LiveFormValidation.setOptions({ messageErrorPrefix: 'test 1', }); window.LiveForm.setOptions({ messageErrorPrefix: 'test 2', }); LiveFormValidation.LiveForm.setOptions({ messageErrorPrefix: 'test 3', }); });
Oh, I got it, I had from previous set up live-form-validation in the webpack config
live-form-validation
new webpack.ProvidePlugin({ 'window.LiveForm': 'live-form-validation' })
I'm using form validation with webpack this is how my
main.js
looks like, but none of the listed options doesn't work me. Is there anyone who use it with webpack as well? Or what I do wrong?Validation works fine, but without the custom options.