Created
May 17, 2020 20:27
-
-
Save j-tim/7d23b23a01a1c75fcaf05d6086c02d73 to your computer and use it in GitHub Desktop.
Customer validation annotations
This file contains hidden or 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
package com.example.validation; | |
import lombok.Data; | |
import javax.validation.constraints.Email; | |
import javax.validation.constraints.NotBlank; | |
@Data | |
public class Customer { | |
@NotBlank | |
private final String name; | |
private final String email; | |
public Customer(String name, String email) { | |
this.name = name; | |
this.email = email; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment