Re: Restrict characters
| From: | Brent Baisley | Date: | Wed, 30 Apr 2003 13:00:24 +0000 |
| Subject: | Re: Restrict characters | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145768@lists.php.net to get a copy of this message | ||
Well then it's more of a javascript question. But you should never rely on just client side validation. It should be used from a user interface point of view, but not for security.
That said, in Javascript I can think of two ways. Use the parseInt() function or subtract 0 from the "number". That will convert the text to a number which you compare to the original text to see if it matches. If it still matches, then it's a number.
On Tuesday, April 29, 2003, at 06:26 PM, Ryan A wrote:
sounds good and thanks for replying but I dont need the characters stripped...just a warning to be show and the form should not submit... Cheers, -Ryan http://mrSahaf.com -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577