By using setCustomValididy() I can set errors on fields when they occur, style faulty elements with a red border and check for errors before further validation and submitting.
However, the placing of the error-message by the browser is not always pretty, it moves away from the elements when the user scrolls and I would like to use colors and icons to style it. Is this possible?
Alternatively, I could just the error-messages in a div near the element without using setCustomValididy(), but then how do I make sure an element that did not validate will keep the form from submitting?
Is there any other way to set validity to false but without showing the validation message (I would show the message in a div)?