<<BACK HOME CNCPT TTRL JS | sf.net/projects/validateformjs | [ U | s | m | ? ] |
rqd dec eml int LEN mcr bss trm sif | All Concepts | |
frm txt pwd txa rdo sl1 chk slm | All Object Types |
validate_form.js
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 |
|
|||||||||
Sub-Range |
|
TOP
rqd dec eml int LEN mcr bss trm sif |
|
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 |
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 |
TOP
rqd dec eml int LEN mcr bss trm sif |
|
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 |
TOP
rqd dec eml int LEN mcr bss trm sif |
|
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 |
Copyright (C) 2003-2005, Jeff Epstein. All rights reserved.