I am using bean validation in a spring mvc application.
I have a form with a text field which should accept only alphabetics and the hyphen (it is optional but if the user put it we should accept it).
I've try this @Pattern( regexp = "\\p{Alpha}*" )
but only letters are accepted.
Does someone have an idea?
Many thanks