Last active
June 21, 2021 11:23
-
-
Save rubykv/6255d94f08a5f78a0140856dfba0f2b5 to your computer and use it in GitHub Desktop.
@validated Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Order { | |
@NotBlank(groups = {ValidationCheckOrder.class}) | |
private String orderId; | |
@Email(groups = {ValidationCheckEmail.class}) | |
@NotBlank(groups = {ValidationCheckEmail.class}) | |
private String email; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@PostMapping(value = "/order") | |
public String stepOne(@Validated(Order.ValidationCheckOrder.class) Order order) {...} | |
@PostMapping(value = "/email") | |
public String stepTwo(@Validated(Order.ValidationCheckEmail.class) Order order) {...} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment