}
}
private static ValidatorRule getFieldRule( String entityName, String propertyName, AnnotationInstance ruleAnnotation )
{
ValidatorRule rule = VALIDATOR_RULE_FACTORY.getFieldRule( entityName, propertyName, ruleAnnotation );
if ( rule != null )
{
//
// message/message-key
//
rule.setMessage( CompilerUtils.getString( ruleAnnotation, MESSAGE_ATTR, true ) );
rule.setMessageKey( CompilerUtils.getString( ruleAnnotation, MESSAGE_KEY_ATTR, true ) );
rule.setBundle( CompilerUtils.getString( ruleAnnotation, BUNDLE_NAME_ATTR, true ) );
if ( rule.getMessage() != null ) assert rule.getMessageKey() == null; // TODO: checker should enforce
//
// args
//
addMessageArgs( rule, ruleAnnotation );