I have a requirement to exclude special characters in first and last name of the fields .
The special characters are :- “ ", / < >
I'm using @Patte aotation on the field name , Please let know the correct regex for the field or where i'm going wrong?
Please find my code below :-
@NotEmpty(message="Please enter your first name.", groups=ShippingAndBillingAddressSame.class)
@Patte(regexp = "["/\\<>,]", message = "The First Name contain invalid characters such as "+"/ \, or < >."+"Please try again.")
private String firstName;
