Thanks David, that was it. Your expertise is much appreciated.
Regards,
Michael
On 23/09/2011, at 12:57 AM, David Zülke wrote:
> On 22.09.2011, at 13:06, Michael McHugh wrote:
>
>> Hello Agavi People!
>>
>> As the subject eludes, I'm having an issue with validators.xml definitions
>> and the AgaviRegexValidator. It could be something simple I am just not
>> seeing and need some extra eyeballs on, but here it is.
>>
>> In app/config/validators.xml I have the following definition:
>> <validator_definition class="AgaviRegexValidator"
>> name="complexPassword">
>> <ae:parameter
>> name="pattern">((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,15})</ae:parameter>
>> </validator_definition>
>>
>> Just as a test, if I change the app/config/validators.xml definition to
>> something like AgaviStringValidator with a min length of 8 and use that
>> named validator in the action, then it works as expected. To me it is
>> looking like the AgaviRegexValidator isn't working as a named definition.
>>
>> Any suggestions or thoughts would be appreciated.
>
> That definition also needs
>
> <ae:parameter name="match">true</ae:parameter>
>
> So the pattern is required to match. The "regex" shortcut has this defined
> (in src/config/defaults/validators.xml). It's a very unfortunate default
> behavior for the validator to require the pattern NOT to match out of the
> box, but we can't change this in the validator itself because it would
> potentially break existing code.
>
> We might consider it for 1.1 though, but I'm not sure it's worth the risk.
>
> Hope that helps and sorry for the inconvenience,
>
> David
>
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.agavi.org/mailman/listinfo/users
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
