Hello!
As I put in the title I need a validator (regular expresion, customvalidator, etc) that allows the user to input everything (lettrs, special characters, spaces) but not numbers.
How can I do that?
Thank you,
Sabrina
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Khargesh RajputRank #616 · 3.9K reputationPosted Feb 16, 2015, 5:43 PM EST
Sabrina Lan9 reputationPosted Feb 16, 2015, 5:47 PM EST
Is there a way to also validate that it has no spaces on the begnin?
Thank you very much
Sabrina
Khargesh RajputRank #616 · 3.9K reputationPosted Feb 16, 2015, 5:47 PM EST
<asp:TextBox id="txtbox" onkeypress="return isNumberKey(event)" runat="server"/>
Sabrina Lan9 reputationPosted Feb 16, 2015, 5:49 PM EST
Khargesh RajputRank #616 · 3.9K reputationPosted Feb 16, 2015, 6:06 PM EST
refer below link
http://www.aspsnippets.com/Articles/Regular-Expression-Regex-to-accept-only-Alphabets-and-Space-in-TextBox-in-ASPNet.aspx
Sabrina Lan9 reputationPosted Feb 16, 2015, 6:13 PM EST
I want a regex that allows all letters and all special characters incluiding space (this is done with ^[^0-9]+$ ) but now the thing that I can't get to work is that it doesn't allow the user to only enter spaces, the textbox has to have at least one letter or special character but not only the space.
Can you help me with this?
I'm really thankful
Khargesh RajputRank #616 · 3.9K reputationPosted Feb 16, 2015, 6:24 PM EST
if yees then follow
http://www.aspsnippets.com/Articles/Implement-Password-Policy-using-Regular-Expressions-and-ASPNet-RegularExpression-Validator.aspx
or http://www.codingfusion.com/Post/Validate-strong-passwords-using-RegularExpressionV
Sabrina Lan9 reputationPosted Feb 16, 2015, 6:29 PM EST