Thanx alot for the reply.
I am trying to return a string as a error message as a result of the validation which is not getting displayed on the screen, but if i try to throw the exception, exception is displayed correctly on the server console. Please guide me on this.
thanx once again
No I havent wrapped my invoke part in rule.
Below is the snap shot of the code:
******************************************************************
public string validateZip(String fieldValue) throws Exception {
boolean invalidTF = false;
string message = null;
String regExp = "^[\\w\\-\\s]*$";
try {
//check to see that regulat expression and RE are not null
if (regExp != null && fieldValue != null
&& 0 < fieldValue.length()) {
RE re = new RE(regExp);
if (re.match(fieldValue)) {
invalidTF = true;
}
}
} catch (RESyntaxException ex) {
ex.printStackTrace();
}
if (invalidTF == true) {
//throw new Exception("Please enter value in correct format invalid expression");
message = "invalid format";
}
return message;
}
*******************************************************************
I am expecting Invalid format to appear on the screen