Im using Spring form validation to validate the input fields entered by the user. I need help to include space in a particular field. Below is the validation annotation that Im using. But it does not seem to allow space.
@RegExp(value="([0-9|a-z|A-Z|_|$|.])*",message="value can contain only digits,alphabets or _ or . or $")
private String cName ;
I would like to know what value I need to include in the validation annotation to include space in the name
I tried to include '\s' in the exp value to include blank space. But it doesn't seem to work
Any help on this is much appreciated.