DEV Community

Discussion on: The free from Validation Framework cookbook 🌽

Collapse
 
tqbit profile image
tq-bit
    if (!form.checkValidity()) {
        // form invalid!
        ... Stuff happens
    }
Enter fullscreen mode Exit fullscreen mode

^this

I didn't know this. Thanks for the article :-)

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

Same until recently, I knew about: input.checkValidity() but not form.checkValidity() Its a really nice time saver, otherwise as I say break out the loops.

Bonus: I also found this HTMLFormElement.reset() which is yet another time saver - makes you think, I must keep an eye out on these native elements methods.