0

My Pojo looks like this -

public class Employee {

   @Pattern(regexp="some regex")

   private String Address;

   **// How do I validate each element in list for the a regex pattern**

   private List<String> names; 
}

My goal is to validate each String in the list 'names' for a regex. How can I achieve that use @Valid in spring mvc validation support ?

aksss
  • 333
  • 5
  • 17

0 Answers0