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:

PIXO (1997) WebDNA-Talk Digest mode broken (1997) database size? (1997) Append again (1999) URL for Discussion Archive (1997) can pull down menu do a ONCHANGE= without Java script? (2000) Webten + Webcat running smooth (1998) Searching for ALL / empty form field (1997) is sku a REQUIRED field on NT (1997) Dynamically Generated Pages & WC? (2000) WC2.0 Memory Requirements (1997) Updating fields from different platforms (1998) [index] (1997) numfound=0 for a search after going into the SSL (2003) [WebDNA] Privat IP website behind a public IP website (2014) date format (another question) (2000) TCPConnect (2002) WebCatalog NT beta 18 now available (1997) Documentation Feedback (1997) WC2.0 Memory Requirements (1997)