You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/05/02 16:35:17 UTC

DO NOT REPLY [Bug 19594] New: - blank fields ignorance not work for javascript minlength

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19594>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19594

blank fields ignorance not work for javascript minlength

           Summary: blank fields ignorance not work for javascript minlength
           Product: Struts
           Version: Nightly Build
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Validator Framework
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: r_q_d@yahoo.com


The blank fields ignorance for minlength check is working for server side 
validation, but is not working for client javascript validation.

In order to support this feature, we need to change the minlength check 
javascript from:
    if (field.value.length < iMin) {
to 
    if (field.value.length < iMin && field.value.length > 0 ) {


The following text is from 
http://jakarta.apache.org/struts/userGuide/dev_validator.html :

Blank fields. 

The default validator-rules.xml now ignores blank fields for all the basic 
validation types. If you require a field to be present then to your 
applications validator.xml field definition add "required" to the depends 
attribute.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org