public java.util.Collection | match(java.lang.String value, java.lang.String name)Validates the given value against this Constraint .
Collection failed_constrained_list = new ArrayList();
if((value != null) && (value.length() != 0)) {
value = value.trim();
if(value.length() == 0){
String failureMessage = formatFailureMessage(toString(), name);
failed_constrained_list.add(new ConstraintFailure(toString(),
value, name, failureMessage, BundleReader.getValue(
"MSG_NonBlankConstraint_Failure"))); //NOI18N
}
}
return failed_constrained_list;
|