Hmmm...don't know about depends=required,minlength, but
depends=required,minlength,mask seems to be working for me.  The snippet below
correctly generates three different types of error messages as expected.

I guess I'd agree that required,minLength is a little lame for password
validation, but hey, they're your business rules...

Oh, and it's minLength, not minlength.  Maybe that's the problem?
                ^              ^
-daniel

Daniel A. Torrey
daniel at datorrey dot net

--- snip---

// require password to be min 8 chars, at least one digit & at least one alpha
<field property="password" depends="required, minlength, mask">

    <msg name="required" key="error.required"/>
    <arg0 key="error.required.password"/>
        
    <msg name="minlength" key="error.invalid.minlength"/>
    <arg0 key="error.required.password"/>
    <arg1 name="minlength" key="${var:minlength}" resource="false"/>
    <var>
        <var-name>minlength</var-name>
        <var-value>8</var-value>
    </var>
        
    <msg name="mask" key="error.invalid.password"/>
    <var>
        <var-name>mask</var-name>
        <var-value> ([[:alpha:]][[:digit:]])|([[:digit:]][[:alpha:]]) </var-value>
    </var>
        
</field>


Quoting Joe Hertz <[EMAIL PROTECTED]>:

> Depends=required,minlength doesn't work (despite the example in SIA and
> all over the net now...).
> 
> According to http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19595
> this bug is marked as WontFix as "Password fields are deliberately not
> checked in this way for security reasons"
> 
> Should I interpret this as declarative that any javascript validation of
> a password length is inherently insecure???? I have a hard time
> believing that given javascript supports this in the language.
> 
> People keep submitting this one, obviously not getting it (like me!).
> 
> What's the logic here??
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to