sergiogx
sergiogx

Reputation: 1582

How to restrict textinput to accept all (including special characters) except numbers?

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

I can't think of a regex for this.

Upvotes: 0

Views: 1826

Answers (2)

Chris Gutierrez
Chris Gutierrez

Reputation: 4755

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

Upvotes: 1

sergiogx
sergiogx

Reputation: 1582

So I didn't really thought this thru

^[0-9]

... >_>

Upvotes: 0

Related Questions