Skip to content

Commit

Permalink
Merge pull request #633 from axonivy-market/XIVY-15555-constraint10
Browse files Browse the repository at this point in the history
XIVY-15555 javax.validation constraints for REST resources
  • Loading branch information
ivy-rew authored Nov 26, 2024
2 parents e87a6ba + 2542d46 commit 57087e1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 57087e1

Please sign in to comment.