web-components icon indicating copy to clipboard operation
web-components copied to clipboard

[text-field] invalid event not fired, validity and validationMessage not available

Open dflorey opened this issue 5 years ago • 1 comments

I'm trying to use client side validation with vaadin-text-field. When calling .checkValidity() the state is reported correctly (true/false), but both .validity and .validationMessage are not available on vaadin-text-field even though they are correctly set on the native input element. Also the "invalid" event is not fired. It would be nice if these methods would be exposed on vaadin-text-field according to the spec: https://developer.mozilla.org/en-US/docs/Web/API/Constraint_validation

dflorey avatar Mar 05 '20 11:03 dflorey

Also a reportValidity() would be great to be able to validate and show validation messages programmtically.

dflorey avatar Apr 01 '20 10:04 dflorey