Re: [WebDNA] Non-numbers entered into a field that asks for a number

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 101607
interpreted = N
texte = I use this for checking phone numbers (min 9 characters) [If ([CountChars][_PHONE][/CountChars]<9)|("[grep search=[^0-9]&replace=error][_PHONE][/Grep]"^"error")] [then] [text]oktoproceed=F[/TEXT] [text]error05=T[/TEXT] [text]errorlist=[ErrorList]*Please enter your phone number.
[/TEXT] [/Then] [/If] Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 11/12/2008, at 9:51 AM, Gary Krockover wrote: > Again - isn't this exactly what a list-menu is for? > > (nice code Dan - just saying....) > > GJK > > On Wed, 10 Dec 2008 14:41:56 -0800 > "Dan Strong" wrote: >> This is a longer, less elegant way, but for archive sake here's an >> alternative: >> ---------------------------------- >> [text]goodChars=1234567890[/text] >> [text]inputLength=[countchars][user_input_field][/countchars][/text] >> [loop start=1&end=[inputLength]] >> [text]x=[getchars start=[index]&end=[index]][user_input_field][/ >> getchars][/text] >> [hideif [goodChars]^[x]] >> Bad Character ([redirect] back to form w/error or whatever) >> [/hideif] >> [/loop] >> ---------------------------------- >> I just did this off the top of my head, so it's untested, but I've >> successfully used similar code in the past. >> -Dan > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Non-numbers entered into a field that asks for a number (Stuart Tremain 2008)
  2. Re: [WebDNA] Non-numbers entered into a field that asks for a number (Marc Thompson 2008)
  3. Re: [WebDNA] Non-numbers entered into a field that asks for a number (Govinda 2008)
  4. Re: [WebDNA] Non-numbers entered into a field that asks for a number (Ki Song 2008)
  5. Re: [WebDNA] Non-numbers entered into a field that asks for a number (Marc Thompson 2008)
  6. [WebDNA] Non-numbers entered into a field that asks for a number (Ki Song 2008)
I use this for checking phone numbers (min 9 characters) [If ([countchars][_PHONE][/CountChars]<9)|("[grep search=[^0-9]&replace=error][_PHONE][/Grep]"^"error")] [then] [text]oktoproceed=F[/TEXT] [text]error05=T[/TEXT] [text]errorlist=[ErrorList]*Please enter your phone number.
[/TEXT] [/Then] [/If] Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 11/12/2008, at 9:51 AM, Gary Krockover wrote: > Again - isn't this exactly what a list-menu is for? > > (nice code Dan - just saying....) > > GJK > > On Wed, 10 Dec 2008 14:41:56 -0800 > "Dan Strong" wrote: >> This is a longer, less elegant way, but for archive sake here's an >> alternative: >> ---------------------------------- >> [text]goodChars=1234567890[/text] >> [text]inputLength=[countchars][user_input_field][/countchars][/text] >> [loop start=1&end=[inputLength]] >> [text]x=[getchars start=[index]&end=[index]][user_input_field][/ >> getchars][/text] >> [hideif [goodChars]^[x]] >> Bad Character ([redirect] back to form w/error or whatever) >> [/hideif] >> [/loop] >> ---------------------------------- >> I just did this off the top of my head, so it's untested, but I've >> successfully used similar code in the past. >> -Dan > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ Stuart Tremain

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Searching/sorting dates (1997) searching for items that begin with a number (2004) founditems / writefile (2005) [SHOWIF]s and empty arguments (1997) Signal Raised Error (Part III) (1997) WCS Newbie question (1997) limiting found items (2001) Removing a character (2000) WebCat2b15MacPlugin - showing [math] (1997) groupfields .. again... (2000) Problems with [Applescript] (1997) WebCatalog f2 Installation (1997) Cookies [was How do I get Google to crawl a WebCatsite?] (2003) Field name-subcategory (1997) Duplicates (1998) WebCatalog and WebTen (1997) Problem about [CART] number (1998) HTML Editors (1997) No shipping systems available? (1998) different ship dates and shopping carts -- how to? (1997)