Iterator keys = actionMap.keySet().iterator();
while (keys.hasNext()) {
String actName = (String) keys.next();
// Get the Action for that name.
ValidatorAction action = resources.getValidatorAction(actName);
// If the result is valid, print PASSED, otherwise print FAILED
System.out.println(
propertyName
+ "["
+ actName
+ "] ("
+ (result.isValid(actName) ? "PASSED" : "FAILED")
+ ")");
//If the result failed, format the Action's message against the formatted field name
if (!result.isValid(actName)) {
success = false;
String message = apps.getString(action.getMsg());
Object[] args = { prettyFieldName };
System.out.println(
" Error message will be: "
+ MessageFormat.format(message, args));