-
-
Save ThakurPriyanka/8dfcaedcd8436d2afcd679806537f89a to your computer and use it in GitHub Desktop.
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
package com.knoldus.user; | |
import com.knoldus.user.annotation.Password; | |
import lombok.Builder; | |
import lombok.Value; | |
import javax.validation.constraints.Pattern; | |
@Value | |
@Builder | |
public class User { | |
@Pattern(regexp ="^[a-zA-z]+$", message = "should be alpha numeric") | |
String username; | |
@Password | |
String password; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment