Hi List,
There is no way AFAIK to specify a different message to be displayed for
the Identity validator.
For example, when using the following format
match=password[%user_general_info_ERR12], it does not pickup the
specified message.
When looking at the code the Identity class looks for the message in the
_identityMessage field which does not seem be settable. So I've modified
the code this way the Identity class to get the message properly
protected String buildIdentityMessage(ValidationMessages messages,
IFormComponent field, IFormComponent referent)
{
Object[] parameters = new Object[]{
field.getDisplayName(), new Integer(_matchType),
referent.getDisplayName()
};
if(_identityMessage!=null) {
return messages.formatValidationMessage(_identityMessage,
ValidationStrings.INVALID_FIELD_EQUALITY, parameters);
} else {
return messages.formatValidationMessage(getMessage(),
ValidationStrings.INVALID_FIELD_EQUALITY, parameters);
}
}
Tell me if this is the right way to do it, or if I miss something
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]