Every text element in the form must have a unique name.MAXLENGTH
Both text and password elements have the standard HTML (and optional) MAXLENGTH attribute available to them. Regarding sMsgBadLength : When MAXLENGTH is associated to the element, both iMinLength and iMaxLength must be less-than-or-equal than it. See the interactive example. Regarding SIFmt -Attributes (sMsgTxt* ): When MAXLENGTH is associated to the element, it must be greater-than-or-equal-to the 'required' part of the SIFmt (the si_rqdMin constructor parameter). See the interactive example. When not explicitely associated to a (text or password ) element, MAXLENGTH is always either -1, or a legal int; never undefined. '-1' means either 'not provided' or 'was provided as an illegal value', and is therefore treated as if it were never provided. For example, setting MAXLENGTH to "bla" in the form, it is changed to -1 before validate_form.js processes it. Internet Explorer exception: When not explicitly set by you, Internet Explorer (version 6 at least) sets MAXLENGTH to 2147483647. Any higher number is too high (illegal), and reverted to -1. When MAXLENGTH equals this special value, it is not displayed in the validate_form.js debugging output. MAXLENGTH is actually represented in memory by 'maxLength '.
|