Avatar

Level 10

Abhiram,

You can try the following and let me know if you still have issues..

Under the Value tab, uncheck the check box for Validation Pattern Message.
Keep the check for Validation Script message. and place the below text in the message area.

//Place this code in Validate Event
var returnMessage = Page1.variables.EmailValidation.validateEmail(this.rawValue);

if(!(returnMessage)){
  this.validationMessage = "Please input a valid email address!";
  this.tst = false;
}
else
  this.tst = true;
  this.tst || Boolean(this.execEvent("exit"));

//Place this code in Exit Event

if(this.rawValue != null && "" + this.rawValue != ""){

  if(!(this.tst)){

  if(this.tst == undefined){  
   this.execEvent("validate");
  }
  else{
    xfa.host.setFocus(this.somExpression);
   }
  }
}


Thanks
Srini