=== modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java' --- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java 2012-12-10 12:34:13 +0000 +++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java 2012-12-10 12:38:04 +0000 @@ -32,6 +32,7 @@ import org.hisp.dhis.web.webapi.v1.validation.constraint.annotation.ValidIdentifiers; import org.hisp.dhis.web.webapi.v1.validation.constraint.annotation.ValidProperties; import org.hisp.dhis.web.webapi.v1.validation.constraint.annotation.ValidUidReference; +import org.hisp.dhis.web.webapi.v1.validation.group.Create; import org.hisp.dhis.web.webapi.v1.validation.group.Update; import javax.validation.constraints.NotNull; @@ -74,7 +75,7 @@ private List coordinates = new ArrayList(); // External Facility Identifiers - @ValidIdentifiers + @ValidIdentifiers( groups = Create.class ) private List identifiers = new ArrayList(); // Implementation specific custom properties === modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/annotation/ValidIdentifiers.java' --- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/annotation/ValidIdentifiers.java 2012-12-10 12:34:13 +0000 +++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/annotation/ValidIdentifiers.java 2012-12-10 12:38:04 +0000 @@ -33,7 +33,6 @@ import javax.validation.Payload; import java.lang.annotation.*; -import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** @@ -50,7 +49,7 @@ Class[] payload() default { }; - @Target( { TYPE } ) + @Target( { ElementType.TYPE, ElementType.METHOD, ElementType.FIELD } ) @Retention( RUNTIME ) @Documented public @interface List