Skip to content Skip to sidebar Skip to footer

Create Line Breaks In Oninvalid Message

I want to create line breaks in my oninvalid pop up message so that I can list multiple requirements on the error message on different lines. Here is the example code of what I'm t

Solution 1:

Add \n instead of the line breaks.

this.setCustomValidity('fix format #1 \n fix format #2\n fix format #3')"

New line in JavaScript alert box

Post a Comment for "Create Line Breaks In Oninvalid Message"