This is my first post, please don't kill me xD.!. Well let's get to the point, it happens that I would like to know if there is any way that with Javascript I can handle alert messages (if that's what they are called), anyway I leave the attached image so that you understand me better
The problem itself is that these messages originate when the submit event is activated and I want to control these messages, that is, to be able to display them with any event, without the need for them to be displayed with the submit event, I hope you understand me.
I know that this message is obtained by using the HTML required attribute, but as I was telling you, I would like a way to generate these alerts with javascript to be able to activate them with any event and not only with the submit type.
Thank you all very much I hope you can help me and as I repeat do not kill me is my first question, greetings.
Yes , as this link explains , it can be done with
JS
.To do this, you have to put an id in the input and then apply the message to the event:
To display these messages at any time, you must make use of
report​Validity()
Example