Open michapietsch opened 6 years ago
Sorry for being dense, but can you tell me what this PR does? Been a little while since I looked at the code on this. Thanks!
Sure, you're welcome! The Constraint API allows to setCustomValidity() to give a custom error message, e.g. "Username already taken" or you can pass an empty string to remove the custom error. This is nice to Integrate additional requirements but still use the Constraint API. The presence of such a custom error is then represented by a property customError: true
inside the validityState object. When using the polyfill before this PR, this behavior was overwritten and therefore removed.
Sorry, I clicked the wrong button 🙈
Makes sense, thanks! And I do that ALL the time. No worries! I'll get this merged soon.
Hi,
I was missing the customError property when working with setCustomValidity(). I think we can safely assume that a custom error was set when validationMessage contains a message but all the other checks don't qualify.
Regards, Micha