Re: Validate user input
Re: Validate user input
- Subject: Re: Validate user input
- From: email@hidden
- Date: Tue, 6 Nov 2001 22:56:48 -0600
At 20:29 +0000 11/06/01, has wrought:
>
Preston Smith wrote:
>
>
>How do I confirm that a user has entered only numerals, or certain
>
>punctuation marks, into a dialog box?
>
>
TIDs method:
>
>
======================================================================
>
>
set theString to "01252"
>
set validCharacters to "1234567890"
______________________________________________________________________
This is another place where I use the RegEx Commands Osax:
----------------------------------------------------------------------
-- valid characters are 0123456789
set theString to "01252x"
if RECompare theString pattern "[^0-9]+" then
beep 2
end if
----------------------------------------------------------------------
--
Best Regards,
Christopher Stone
______________________________
StoneWorks Computer Consulting
email@hidden