Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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)?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
220 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...