Pristine
Pristine copied to clipboard
Fix getErrors issue when field has not error
Maybe I am missing something, but if I try to get all errors for all input, sometime field has not property errors.
Before checking field.errors.length I add a check if field.errors is set.
Otherwise there is an error in console.
+1 for this, just hit this with using
const inputs = $page.querySelectorAll('input, select, textarea');
pristine.validate(inputs)