clearMessages();
}
objectClass = object.getClass();
Rules rules = null;
if (object instanceof PropertyConstraintProvider) {
PropertyConstraintProvider propertyConstraintProvider = (PropertyConstraintProvider) object;
if (propertyName != null) {
PropertyConstraint validationRule = propertyConstraintProvider.getPropertyConstraint(propertyName);
checkRule(validationRule);
}
else {
for (Iterator fieldNamesIter = formModel.getFieldNames().iterator(); fieldNamesIter.hasNext();) {
PropertyConstraint validationRule = propertyConstraintProvider
.getPropertyConstraint((String) fieldNamesIter.next());
checkRule(validationRule);
}
}
}