Skip to content

Instantly share code, notes, and snippets.

@ThakurPriyanka
Created August 26, 2018 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThakurPriyanka/8dfcaedcd8436d2afcd679806537f89a to your computer and use it in GitHub Desktop.
Save ThakurPriyanka/8dfcaedcd8436d2afcd679806537f89a to your computer and use it in GitHub Desktop.
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