Pattern Validation shows twice after adding "field requierd" message on exit



Hello everyone,

I have a couple of custom objects in my form (like US SSN, phone and email).

The pattern validation worked fine until I added a java script to those fields to show a message that they are required when you tab out of the field.

The javascript is:

this.mandatory = "error";

this.mandatoryMessage = "this field is mandatory!"; which was added on exit event.

Now the pattern validation shows twice if the data is invalid.