Use severity "info", that won't cause the value to be removed. David
On 18.12.2011, at 15:27, [email protected] wrote: > hey, > > I've a problem with depends/provides parameters of validators, here's the > situation: > imaging that i have a variable named foo, now i want: > * if foo is greater than 10, bar gets validated > * if foo is less than or equal to 10, baz get validated > > my validation xml is something like: > > <validator name="foo" class="number"> > <argument>foo</argument> > </validator> > <!-- 666f6f5f3e5f3130=bin2hex('foo_>_10') --> > <validator name="666f6f5f3e5f3130" class="number" provides="666f6f5f3e5f3130" > severity="silent"> > <argument>foo</argument> > <ae:parameter name="min">11</ae:parameter> > </validator> > <!-- 666f6f5f3c3d5f3130=bin2hex('foo_<=_10') --> > <validator name="666f6f5f3c3d5f3130" class="number" > provides="666f6f5f3c3d5f3130" severity="silent"> > <argument>foo</argument> > <ae:parameter name="max">10</ae:parameter> > </validator> > <validator name="bar" depends="666f6f5f3e5f3130" class="string"> > <argument>bar</bar> > </validator> > <validator name="baz" depends="666f6f5f3c3d5f3130" class="string"> > <argument>baz</argument> > </validator> > > (check http://pastebin.com/SZP3QZ7Z if ^ is unreadable) > > now, problem is when i do $rd->getParameters() in my action i get bar/baz as > expected but not foo itself. i know foo won't be in AgaviRequestDataHolder > because one of validators that works on foo has been failed but how i can have > such structure? > > -- > Regards, > Behrooz > > > -- > You Rock! Your E-Mail Should Too! Signup Now at Rock.com and get 2GB of > Storage! > > http://connections.rock.com/user/displayUserRegisterPage.kickAction?as=116748&STATUS=MAIN > > _______________________________________________ > users mailing list > [email protected] > http://lists.agavi.org/mailman/listinfo/users > _______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
