Phone Number Validation

Alex Tweedly alex at tweedly.net
Wed Feb 15 18:25:49 EST 2006


Jeff Honken wrote:

>Jim,
>  I must be missing something.  I saw that in the Docs but I couldn't
>get it to work.  
>
matchText is a function that returns either true or false.  The part 
where you do
    if pPhoneToCheck is matchText(...)  
is unnecessary and wrong.

You use it like

  if matchText(pPhoneToCheck,"([0-9]+)-([0-9]+-[0-9]+)") then
    return pPhoneToCheck
  else
    return "Bad Phone"
  end if



-- 
Alex Tweedly       http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.8/260 - Release Date: 14/02/2006




More information about the use-livecode mailing list