Closed Sumit-Chakole closed 7 years ago
Can you please rephrase this issue? I don't understand what you mean.
Closing due to non-responsiveness
I think he means adding polyfill for HTMLFormElement.checkValidity()
:
Returns true if the element's child controls are subject to constraint validation and satisfy those contraints; returns false if some controls do not satisfy their constraints. Fires an event named invalid at any control that does not satisfy its constraints; such controls are considered invalid if the event is not canceled. It is up to the programmer to decide how to respond to false.
I would love to have this as well.
checkValidity
is pointless. It does the same thing as HTMLFormElement.validity
, but provides you with no additional information.
See PPK's piece on native form validation for more details on what I mean.
The importance part of checkValidity
, at least to me, is the invalid
event that fires from it that can be cancelled.
Also, input elements can also have this function too. The "invalid" event allows us to handle error display elsewhere when needed.
Put another way: beyond the scope of this project. There are some other projects that provide broader polyfilling.
I'll respect that.
No api to validate complete form, return boolean if form looks good or if form has error show all of them.