views:

109

answers:

2

I have a text field (for names) wich must allow all characters, except latin numbers, is this possible?

I can't think of a regex for this

thanks

A: 

So I didn't really thought this thru

^[0-9]

... >_>

sergiogx
+1  A: 

You can add a key up event handler to the text field and run a replace using the regex that zombiegx mentioned.

Chris Gutierrez
zombiegx is the person asking the question.
jonathanasdf
yup. I guess I should pay more attention.
Chris Gutierrez
I'm not sure that would do it, because people would still be able to Paste numbers in there as part of clipboard content. I'd use change="" event to run a search and replace, each numbers (only 10 of them right?) by "". HTH.
keyle
Yup, exactly. The CHANGE event is definitely more appropriate.
Chris Gutierrez
if the string has numbers then it shouldn't be allowed in the first place, so I used a validator when submiting. thanx all
sergiogx