Reputation: 9755
I'm setting custom validity using HTML5 Constraints API like this
inputElement.setCustomValidity('This is custom error message')
Then I'm trying to retrieve the value afterwards, but it's not present in any of ValidityState
object fields when I'm listing them. It just sets customError
to true
, but the message is not in there.
How can I retrieve this message from the input element?
Upvotes: 2
Views: 763