Pristine icon indicating copy to clipboard operation
Pristine copied to clipboard

Fix getErrors issue when field has not error

Open thewebartisan7 opened this issue 5 years ago • 1 comments

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.

thewebartisan7 avatar Oct 13 '20 06:10 thewebartisan7

+1 for this, just hit this with using

const inputs = $page.querySelectorAll('input, select, textarea');
pristine.validate(inputs)

engram-design avatar Aug 08 '21 06:08 engram-design