Created
February 26, 2011 08:45
-
-
Save sejersbol/845062 to your computer and use it in GitHub Desktop.
Check database constraints on-the-fly.
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
... | |
import javax.validation.constraints.Min; | |
import javax.validation.constraints.Size; | |
import javax.validation.constraints.NotNull; | |
@Data | |
public class SomeDto { | |
@Min(0) | |
private int id; | |
@Size(min=2, max=8) | |
private String firstName; | |
@NotNull | |
private String lastName; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment