<<BACK    HOME    CNCPT    TTRL    JSsf.net/projects/validateformjs[ U | s | m | ? ]
   rqd dec eml int LEN mcr bss trm sifAll Concepts
   frm txt pwd txa rdo sl1 chk slmAll Object Types

validate_form.js
Concept: sMsgBadLength

Restricts the length of a string to a defined range. Summary
sMsgBadLength All Attributes
txt pwd txa rdo sl1 chk slm Interactive Example Code
Higher  [  trm rqd LEN dec eml int sif mcr bss  ]  Lower Precedence


[TOP]   sMsgBadLength attribute: sMsgBadLength        
Value Purpose The error message presented to the user when the value's length is out of range.
Value Rules Must be a string at least one character in length.
Object Compatibility text,  password,  textarea
Attribute Compatibility sMsgRequired,  sMsgTxtDec,  sMsgTxtEmail,  bsNoBadSubStrs,  asBadSubStrs,  sMsgBadSubStr,  bsDontTrimSpaces,  bsTrimSpaces
Special Strings
  • ~RANGE_MIN~: Translated to iMinLength
  • ~RANGE_MAX~: Translated to iMaxLength
Sub-Range
Name Purpose Rules
iMinLength The minimum allowable length. When provided, must be an integer zero or greater (see the text MAXLENGTH note). At least one of iMinLength and iMaxLength must be provided. When iMaxLength is also provided, this must be less-than-or-equal-to it.
iMaxLength The maximum allowable length When provided, must be an integer zero or greater (see the text MAXLENGTH note). When iMinLength is also provided, this must be greater-than-or-equal-to it.









TOP     rqd dec eml int LEN mcr bss trm sif
<<BACK  TXT pwd txa rdo sl1 chk slm
Object Type Concept
text sMsgBadLength

VF-Config Snippet f_orm.str_of_len.sMsgBadLength = 'The string's length must be between ~RANGE_MIN~ and ~RANGE_MAX~, inclusive. Current length: ~CURRLEN~.';
Example Element <INPUT TYPE="text" NAME="str_of_len">

There is another example where MAXLENGTH is also associated to the element.

The form Change the vf-configuration
Give me a string having a legal length:
sMsgRequired
   iMinLength
      
      
   iMaxLength
      
      
[[     [ CIBC CRSH ]   DBG     ]]



BACK    SIFmt Attribute Example: A 'text' element with MAXLENGTH associated to it.

VF-Config Snippet f_orm.str_of_len.sMsgBadLength = 'The string's length must be between ~RANGE_MIN~ and ~RANGE_MAX~, inclusive. Current length: ~CURRLEN~.';
Example Element <INPUT TYPE="text" MAXLENGTH="5" NAME="str_of_len">

MAXLENGTH, when associated, must be greater than or equal to both iMinLength and iMaxLength.

The form Change the vf-configuration
Give me a string having a legal length:
sMsgRequired
   iMinLength
      
      
   iMaxLength
      
      
[[     [ CIBC CRSH ]   DBG     ]]



TOP     rqd dec eml int LEN mcr bss trm sif
<<BACK  txt PWD txa rdo sl1 chk slm
Object Type Concept
password sMsgBadLength

VF-Config Snippet f_orm.password_of_len.sMsgBadLength = 'The *secret* string's length (shhhhh) must be between ~RANGE_MIN~ and ~RANGE_MAX~, inclusive. Current length: ~CURRLEN~.';
Example Element <INPUT TYPE="password" NAME="password_of_len">

The form Change the vf-configuration
Give me a secret string (shhhh) having a legal length:
sMsgRequired
   iMinLength
      
      
   iMaxLength
      
      
[[     [ CIBC CRSH ]   DBG     ]]



TOP     rqd dec eml int LEN mcr bss trm sif
<<BACK  txt pwd TXA rdo sl1 chk slm
Object Type Concept
textarea sMsgBadLength

VF-Config Snippet f_orm.paragraph_of_len.sMsgBadLength = 'The paragraph\'s length must be between ~RANGE_MIN~ and ~RANGE_MAX~, inclusive. Current length: ~CURRLEN~.';
Example Element <INPUT TYPE="textarea" NAME="paragraph_of_len">

The form Change the vf-configuration
Give me a paragraph having a legal length:
sMsgRequired
   iMinLength
      
      
   iMaxLength
      
      
[[     [ CIBC CRSH ]   DBG     ]]





































SourceForge.net Logo

Copyright (C) 2003-2005, Jeff Epstein.   All rights reserved.