Re: Phone Number Validation Function

2017-09-11 Thread Stephen MacLean via use-livecode
Hi Bob, Last year I released a sample library for base functions like this: https://github.com/renegadesteve/rsIsValid You can use the LCS version, or build a widget library for your version of LC 9. It does use RegEx, but you can Sean said, there

Re: Phone Number Validation Function

2017-09-11 Thread Bob Sneidar via use-livecode
Thanks Sean, but reading through that article, I think it makes the arguement for NOT using RegEx, seeing all the arguments back and forth about what is wrong with each other's regex, and one guy pooh poohing all of them in favor of a procedural approach. My goal is not to simply allow

Re: Phone Number Validation Function

2017-09-11 Thread Sean Cole (Pi) via use-livecode
Bob. >> >> JB >> >> >> > On Sep 11, 2017, at 11:20 AM, Bob Sneidar via use-livecode < >> use-livecode@lists.runrev.com> wrote: >> > >> > Hi all. >> > >> > Since I needed to write one, I thought I would share this phone

Re: Phone Number Validation Function

2017-09-11 Thread Sean Cole (Pi) via use-livecode
; > Since I needed to write one, I thought I would share this phone number > validation function. NOTE: it only works for phone numbers of the following > format: > > > > -- pure numbers > > nnn > > nn > > > > -- formatted numbers

Re: Phone Number Validation Function

2017-09-11 Thread JB via use-livecode
Thanks Bob. JB > On Sep 11, 2017, at 11:20 AM, Bob Sneidar via use-livecode > <use-livecode@lists.runrev.com> wrote: > > Hi all. > > Since I needed to write one, I thought I would share this phone number > validation function. NOTE: it only works for pho

Re: Phone Number Validation Function

2017-09-11 Thread Bob Sneidar via use-livecode
WHOOPS! Change this line to if length(tPhoneNumber) <> 14 AND length(tPhoneNumber) <> 12 then > On Sep 11, 2017, at 11:20 , Bob Sneidar via use-livecode > wrote: > > if length(tPhoneNumber) <> 14 or length(tPhoneNumber) <> 12 then

Phone Number Validation Function

2017-09-11 Thread Bob Sneidar via use-livecode
Hi all. Since I needed to write one, I thought I would share this phone number validation function. NOTE: it only works for phone numbers of the following format: -- pure numbers nnn nn -- formatted numbers nnn- nnn-nnn- (nnn) nnn- It will also accept a space