I am using: ValidationExpression="^[0-9开发者_Go百科a-zA-Z]+$"
to try and only allow letters and numbers with no symbols.
Yet when I enter a phrase into the box that includes a space, it fails to validate. So I'm guessing I need to explicitly allow spaces too? Example of a search that is not working:
"Summer holiday"
Just add the space?
^[0-9a-zA-Z ]+$
very easy:-
\w+[a-zA-Z\s]+$
for Characters only
\w+[0-9a-zA-Z\s]+$
Alpha Numeric
You must include in [..] spaces. Space, tabulate, etc.. have symbol \s, so you regex: ^[0-9a-zA-Z\s]+$
精彩评论