public List<ValidationErrorMessage> validateValue(String value){
  errorMessageIds.clear();
  if (dataRestrictions.isRequired() && valueNullOrEmpty(value)) {
    errorMessageIds.add(new ValidationErrorMessage("required",id,null));
  }
 else {
    if (!valueNullOrEmpty(value)) {
      for (      AbstractValidationRule rule : dataRestrictions.getValidationRules()) {
        if (!rule.validate(value)) {
          errorMessageIds.add(new ValidationErrorMessage(rule.getMessageId(),id,rule));
        }
      }
    }
  }
  return errorMessageIds;
}

public List < ValidationErrorMessage > validateValue ( String value ) { errorMessageIds . clear ( ) ; if ( dataRestrictions . isRequired ( ) && valueNullOrEmpty ( value ) ) { errorMessageIds . add ( new ValidationErrorMessage ( "required" , id , null ) ) ; } else { if ( ! valueNullOrEmpty ( value ) ) { for ( AbstractValidationRule rule : dataRestrictions . getValidationRules ( ) ) { if ( ! rule . validate ( value ) ) { errorMessageIds . add ( new ValidationErrorMessage ( rule . getMessageId ( ) , id , rule ) ) ; } } } } return errorMessageIds ; }
gets all errormessagecodes for this field ' s value . this list is filled after doing isvalid ( ) on this field
