Skip to content

Commit

Permalink
XIVY-15555 use javax.validation constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
ivy-rew committed Nov 26, 2024
1 parent 87fbc16 commit c914374
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 c914374

Please sign in to comment.