Dear all
i want allow into my textbox charecters and coma,speace,+,- dont allow numbers
javascript
Textbox allowing only charecters and ("," coma,"" speace,+,-
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
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
Pradeep ShetRank #595 · 4K reputationPosted Aug 11, 2014, 9:12 PM EDT
You can validate it for IsNumber(txtbox.value) else use regular expression and validate it using
regEx.text(textbox.value) .About how to write regular expression you can find lots of websites
Hope this helps you. If it is so plz mark it as answered
Prasad BhagatRank #3,426 · 422 reputationPosted Aug 11, 2014, 9:19 PM EDT
i need sample code
VulpesRank #55 · 29.2K reputationPosted Aug 12, 2014, 1:08 AM EDT
Pradeep ShetRank #595 · 4K reputationPosted Aug 12, 2014, 9:38 AM EDT
if(regEx.text(textbox.value))
{
//valid
}
else
{
//Invalid
}
Mark it answered if helped