Start Talidating com

Talidating com

There are other ways to highlight the field in question besides changing the text color, the border color or the fill color could be changed instead, or in addition, just make sure that you are not making the form impossible to read.

So, if the user enters ‘01234’ we should see an error message that would instruct the user about what type of data is valid for this field.

In the latter case, we set rc to false, and also display an error message.

When you play around with the function, you’ll notice that the validation function is only called when the focus leaves the field, so you have to click outside of the field to actually make that error message pop up.

In this example, we demonstrate how to activate such validation.