From c914374b764176f93f47206e877fa441b55fff52 Mon Sep 17 00:00:00 2001 From: Reguel Wermelinger Date: Tue, 26 Nov 2024 11:06:28 +0100 Subject: [PATCH] XIVY-15555 use javax.validation constraint --- .../com/axonivy/connectivity/rest/provider/PersonService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/connectivity/connectivity-demos/src/com/axonivy/connectivity/rest/provider/PersonService.java b/connectivity/connectivity-demos/src/com/axonivy/connectivity/rest/provider/PersonService.java index 6274352ab..ef30f070d 100644 --- a/connectivity/connectivity-demos/src/com/axonivy/connectivity/rest/provider/PersonService.java +++ b/connectivity/connectivity-demos/src/com/axonivy/connectivity/rest/provider/PersonService.java @@ -8,6 +8,7 @@ import java.util.UUID; import javax.inject.Singleton; +import javax.validation.constraints.Size; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.FormParam; @@ -118,7 +119,7 @@ public Response getPerson(@PathParam("entryNo") int entryNo) @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public Response add( - @Parameter(required = true) @FormParam("firstname") String firstname, + @Parameter(required = true) @FormParam("firstname") @Size(min = 2, max = 255) String firstname, @Parameter(required = true) @FormParam("lastname") String lastname) { Person person = addNewPerson(firstname, lastname);