Re: Validation

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 29422
interpreted = N
texte = At 4:57 PM -0600 2000/03/21, Tony Frenzel wrote:>Is there any special way to validate and set parameters for a specific >field in a form in web catalog? For example if I want to make an e-mail >address field MANDATORY to fill out before continuing on... any suggestions?I was very surprised to discover that WebCat did not have built in tags for this. Since it was not built in, I have been collecting validation routines from hints and clues from various posts into one global include file. To use it, put an include such as: [include file=^-Validate &Nonblank=_First,_Last,_Initiated &DateCheck=_Birthdate &ZipCheck=_HZip,_EZip &EmailCheck=_HEmail,_EEmail](returns added for clarity - remove to use)The code of the include file is as follows (note I have not tested the numericCheck yet): -Chuck-[math show=f]error=0[/math] [text]ErrMsg=[/text][!][CLOSEDATABASE ^-PictureCheckTable.db][/!][formvariables name=_&exact=F] [!] [name] - [index] - [value]
[/!] [!] ----------------------------------------------- NonBlank -- [/!] [showif [NonBlank]^[name]] [showif [url][value][/url]=] [math show=F]error=error+1[/math] [text]ErrMsg=[ErrMsg][name] cannot be left blank
[/text] [/showif] [/showif] [!] ----------------------------------------------- DateCheck -- [/!] [showif [DateCheck]^[name]] [hideif [url][value][/url]=] [showif NNNNsNNsNN![ConvertChars db=^-PictureCheckTable.db][value][/ConvertChars]] [math show=F]error=error+1[/math] [text]ErrMsg=[ErrMsg][name] [value] must be in YYYY/MM/DD format
[/text] [/showif] [/hideif] [/showif] [!] ----------------------------------------------- ZipCheck -- [/!] [showif [ZipCheck]^[name]] [hideif [url][value][/url]=] [text]tErr=T[/text] [showif NNNNN=[ConvertChars db=^-PictureCheckTable.db][value][/ConvertChars]] [text]tErr=F[/text] [/showif] [showif NNNNNdNNNN=[ConvertChars db=^-PictureCheckTable.db][value][/ConvertChars]] [text]tErr=F[/text] [/showif] [showif NNNdNNNN=[ConvertChars db=^-PictureCheckTable.db][value][/ConvertChars]] [text]tErr=F[/text] [/showif] [showif [tErr]=T] [math show=F]error=error+1[/math] [text]ErrMsg=[ErrMsg][name] [value] must be in nnnnn, nnnnn-nnnn, or nnn-nnnn format
[/text] [/showif] [/hideif] [/showif] [!] ----------------------------------------------- NumericCheck -- [/!] [showif [NumericCheck]^[name]] [hideif [url][value][/url]=] [showif [math show=T][admingiven]*0[/math]!0] [math show=F]error=error+1[/math] [text]ErrMsg=[ErrMsg][name] Value must contain only numbers
[/text] [/showif] [/hideif] [/showif] [!] ----------------------------------------------- EmailCheck -- [/!] [showif [EmailCheck]^[name]] [hideif [url][value][/url]=] [hideif [value]^@] [hideif [value]^.] [math show=F]error=error+1[/math] [text]ErrMsg=[ErrMsg][name] Email IDs must be in user@domain.com format
[/text] [/hideif] [/hideif] [/hideif] [/showif] [/formvariables] [!] ----------------------------------------------- Redirect -- [/!][showif [math]error[/math]>0] [redirect [listwords Words=[referrer]&delimiters=?][!] [/!][showif [index]=1][word][/showif][!] [/!][/listwords]?error=[math]error[/math][!] [/!]&ErrMsg=[URL][ErrMsg][/URL][!] [/!][formvariables][hideif [name]=template]&[name]=[url][value][/url][/hideif][/formvariables]] [/showif][!]End ValidationChecker routine[/!] __________________________________________________________________________ Chuck Rice ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Associated Messages, from the most recent to the oldest:

    
  1. [WebDNA] email validation ("Vincent Medina" 2019)
  2. Re: [WebDNA] jQuery validation and webdna (Nices Lists 2015)
  3. Re: [WebDNA] jQuery validation and webdna (Michael Davis 2015)
  4. Re: [WebDNA] jQuery validation and webdna (Rich Kwas 2015)
  5. Re: [WebDNA] jQuery validation and webdna (Rich Kwas 2015)
  6. Re: [WebDNA] jQuery validation and webdna (William DeVaul 2015)
  7. Re: [WebDNA] jQuery validation and webdna (Nices Lists 2015)
  8. Re: [WebDNA] jQuery validation and webdna (Stuart Tremain 2015)
  9. [WebDNA] jQuery validation and webdna (Rich Kwas 2015)
  10. Re: File Format Validation ( Clint Davis 2005)
  11. Re: File Format Validation ( William DeVaul 2005)
  12. Re: File Format Validation ( William DeVaul 2005)
  13. Re: File Format Validation ( Clint Davis 2005)
  14. File Format Validation ( Clint Davis 2005)
  15. Re: Code validation (was: problem using...) ( "Nitai @ ComputerOil" 2004)
  16. Code validation (was: problem using...) ( Frank Nordberg 2004)
  17. Re: [OT] javascript field validation with encoded forms ( Gary Krockover 2004)
  18. [OT] javascript field validation with encoded forms ( Joe D'Andrea 2004)
  19. Re: W3c Validation ( Clint Davis 2004)
  20. W3c Validation ( Jason Ludwig 2004)
  21. Re: Trigger Validation Text Broken ( Dale's Stuff 2003)
  22. Re: Trigger Validation Text Broken ( Phillip Bonesteele 2003)
  23. Re: Trigger Validation Text Broken ( Scott Anderson 2003)
  24. Re: Trigger Validation Text Broken ( dale 2003)
  25. Re: Trigger Validation Text Broken ( Scott Anderson 2003)
  26. Re: Trigger Validation Text Broken ( Phillip Bonesteele 2003)
  27. Re: Trigger Validation Text Broken ( Chris List Recipient 2003)
  28. Trigger Validation Text Broken ( Chris List Recipient 2003)
  29. Re: Javascript Form Validation (Tim Robinson 2002)
  30. Re: Javascript Form Validation (Clint Davis 2002)
  31. Re: Javascript Form Validation (Tim Robinson 2002)
  32. OT: Javascript Form Validation (Clint Davis 2002)
  33. Re: https validation (Marc M. 2001)
  34. Re: https validation (Marc M. 2001)
  35. Re: https validation (Bob Minor 2001)
  36. Re: https validation (Bob Minor 2001)
  37. Re: https validation (Glenn Busbin 2001)
  38. Re: https validation (Glenn Busbin 2001)
  39. Re: https validation (Bob Minor 2001)
  40. Re: https validation (Marc M. 2001)
  41. Re: https validation (Pedro Rivera 2001)
  42. Re: https validation (Charles Kline 2001)
  43. https validation (Marc M. 2001)
  44. Re: https validation (John Peacock 2001)
  45. Re: https validation (Charles Kline 2001)
  46. Re: Form Validation (John Butler 2000)
  47. Re: Form Validation (John Peacock 2000)
  48. Form Validation (Mark Sherwood 2000)
  49. Re: Validation (Vince Medina 2000)
  50. Re: Validation (Kenneth Grome 2000)
  51. Re: Validation (Robie Blair 2000)
  52. Re: Validation (Kenneth Grome 2000)
  53. Re: Validation (Tony Frenzel 2000)
  54. Re: Validation (Tony Frenzel 2000)
  55. Re: Validation (Tony Frenzel 2000)
  56. Re: Validation (Robie Blair 2000)
  57. Re: Validation (Chuck Rice 2000)
  58. Re: Validation (Robie Blair 2000)
  59. Re: Validation (Glenn Busbin 2000)
  60. Re: Validation (Kenneth Grome 2000)
  61. Re: Validation (Bob Minor 2000)
  62. Re: Validation (Chuck Rice 2000)
  63. Re: Validation (Bob Minor 2000)
  64. Re: Validation (Chuck Rice 2000)
  65. Re: Validation (Glenn Busbin 2000)
  66. Re: Validation (Marc Thompson 2000)
  67. Validation (Tony Frenzel 2000)
  68. Re: field validation problem (Chris Vargas 1999)
  69. Re: Field validation problem (Bob Minor 1999)
  70. Re: Field validation problem (Chris Vargas 1999)
  71. Re: user/password validation (Jay Van Vark 1998)
  72. Re: user/password validation (Kenneth Grome 1998)
  73. Re: user/password validation (Charlie Romero 1998)
  74. Re: user/password validation (Kenneth Grome 1998)
  75. Re: user/password validation (Mícheál O Sé 1998)
  76. Re: user/password validation (Mícheál O Sé 1998)
  77. user/password validation (Charlie Romero 1998)
At 4:57 PM -0600 2000/03/21, Tony Frenzel wrote:>Is there any special way to validate and set parameters for a specific >field in a form in web catalog? For example if I want to make an e-mail >address field MANDATORY to fill out before continuing on... any suggestions?I was very surprised to discover that WebCat did not have built in tags for this. Since it was not built in, I have been collecting validation routines from hints and clues from various posts into one global include file. To use it, put an include such as: [include file=^-Validate &Nonblank=_First,_Last,_Initiated &DateCheck=_Birthdate &ZipCheck=_HZip,_EZip &EmailCheck=_HEmail,_EEmail](returns added for clarity - remove to use)The code of the include file is as follows (note I have not tested the numericCheck yet): -Chuck-[math show=f]error=0[/math] [text]ErrMsg=[/text][!][CLOSEDATABASE ^-PictureCheckTable.db][/!][formvariables name=_&exact=F] [!] [name] - [index] - [value]
[/!] [!] ----------------------------------------------- NonBlank -- [/!] [showif [NonBlank]^[name]] [showif [url][value][/url]=] [math show=F]error=error+1[/math] [text]ErrMsg=[ErrMsg][name] cannot be left blank
[/text] [/showif] [/showif] [!] ----------------------------------------------- DateCheck -- [/!] [showif [DateCheck]^[name]] [hideif [url][value][/url]=] [showif NNNNsNNsNN![ConvertChars db=^-PictureCheckTable.db][value][/ConvertChars]] [math show=F]error=error+1[/math] [text]ErrMsg=[ErrMsg][name] [value] must be in YYYY/MM/DD format
[/text] [/showif] [/hideif] [/showif] [!] ----------------------------------------------- ZipCheck -- [/!] [showif [ZipCheck]^[name]] [hideif [url][value][/url]=] [text]tErr=T[/text] [showif NNNNN=[ConvertChars db=^-PictureCheckTable.db][value][/ConvertChars]] [text]tErr=F[/text] [/showif] [showif NNNNNdNNNN=[ConvertChars db=^-PictureCheckTable.db][value][/ConvertChars]] [text]tErr=F[/text] [/showif] [showif NNNdNNNN=[ConvertChars db=^-PictureCheckTable.db][value][/ConvertChars]] [text]tErr=F[/text] [/showif] [showif [tErr]=T] [math show=F]error=error+1[/math] [text]ErrMsg=[ErrMsg][name] [value] must be in nnnnn, nnnnn-nnnn, or nnn-nnnn format
[/text] [/showif] [/hideif] [/showif] [!] ----------------------------------------------- NumericCheck -- [/!] [showif [NumericCheck]^[name]] [hideif [url][value][/url]=] [showif [math show=T][admingiven]*0[/math]!0] [math show=F]error=error+1[/math] [text]ErrMsg=[ErrMsg][name] Value must contain only numbers
[/text] [/showif] [/hideif] [/showif] [!] ----------------------------------------------- EmailCheck -- [/!] [showif [EmailCheck]^[name]] [hideif [url][value][/url]=] [hideif [value]^@] [hideif [value]^.] [math show=F]error=error+1[/math] [text]ErrMsg=[ErrMsg][name] Email IDs must be in user@domain.com format
[/text] [/hideif] [/hideif] [/hideif] [/showif] [/formvariables] [!] ----------------------------------------------- Redirect -- [/!][showif [math]error[/math]>0] [redirect [listwords Words=[referrer]&delimiters=?][!] [/!][showif [index]=1][word][/showif][!] [/!][/listwords]?error=[math]error[/math][!] [/!]&ErrMsg=[url][ErrMsg][/URL][!] [/!][formvariables][hideif [name]=template]&[name]=[url][value][/url][/hideif][/formvariables]] [/showif][!]End ValidationChecker routine[/!] __________________________________________________________________________ Chuck Rice ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Chuck Rice

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:

RE: Price recalc based on quantity (1997) HomePage Caution (1997) Memory Error message (1998) How do you hide [math]stuff[/math] (1997) can WC render sites out? (1997) page chokes on hideif when false and ignored (1998) carriage returns in data (1997) [WebDNA] bug in sending & character to DOS (2010) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) Encrypted links ... (2000) Webcatalog error, Plug-in for Webstar (1996) Updating a database once per day - An example (1998) Stumpted Again (1997) weird happenings (1997) textarea question (1998) Setting up shop (1997) Looking up two prices in Formulas.db (1997) Question about replacing words (1998) Updating a database once per day - An example (1998) two forms of delivery (1998)