• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Validate user input
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Validate user input (From: has <email@hidden>)

  • Prev by Date: Re: Using Data From Tab Delimited Text File
  • Next by Date: Check a folder for the presence of a file
  • Previous by thread: Re: Validate user input
  • Next by thread: Re: Validate user input
  • Index(es):
    • Date
    • Thread