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]RegardsStuart TremainIDFK Web DevelopmentsAUSTRALIAwebdna@idfk.com.auOn 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:
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]RegardsStuart TremainIDFK Web DevelopmentsAUSTRALIAwebdna@idfk.com.auOn 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:
WC Database Format (1997)
Re:Emailer and encryption (1997)
User Defined Sorting (1997)
[WebDNA] Gulf Coast WebDNA programmers (2010)
WebCatalog can't find database (1997)
Running _every_ page through WebCat-error.html (1997)
setlineitem quantity to zero? (2000)
READFILE command? (1998)
Exclude by date - multiple (1997)
Banners (1997)
move files (2000)
SendTo more emails (1998)
partial credits (2003)
question: search return in order (1997)
[SearchString] problem with [search] context (1997)
Adding Items to Cart (2003)
Hiding HTML and page breaks (1997)
Still Stumped on ShowNext...HELP! (1997)
newbie Q: [cart] documentation (1999)
Sku numbers (1997)