Created
October 20, 2016 09:47
-
-
Save mkuehle/d728a723090a97234ff3fc9b32764ef8 to your computer and use it in GitHub Desktop.
Java EE 7 - JAX-RS Bean Validation - DTO
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 User { | |
@NotNull(message="Der Name muss angegeben werden") | |
@Size(min=3, max=10, message="Der Name muss zwischen {min} und {max} Zeichen lang sein") | |
private String name; | |
@NotNull(message="Die E-Mail Adresse ist ein Pflichtfeld") | |
private String email; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment