0

How to use bean-validation @Pattern in the field below to check if the first digit is '1'?

  private Long registration;
Liam Park
  • 414
  • 1
  • 9
  • 26

1 Answers1

1

Regex bellow says it must start with 1 and have anything after that

 @Pattern (regexp = "^1.*$")
 private Long registration;
Liam Park
  • 414
  • 1
  • 9
  • 26