#1085: Allow omission of empty argument tag when using arguments base
------------------------+---------------------------------------------------
 Reporter:  david       |       Owner:  david   
     Type:  task        |      Status:  assigned
 Priority:  normal      |   Milestone:  1.0.1   
Component:  validation  |     Version:  1.0.0   
 Severity:  trivial     |    Keywords:          
Has_patch:  0           |  
------------------------+---------------------------------------------------
Description changed by david:

Old description:

> {{{
> #!xml
> <arguments base="users[]">
>   <argument>email</argument>
> </arguments>
> }}}
> validates {{{users[*][email]}}}.
>
> However,
> {{{
> #!xml
> <arguments base="users[]">
>   <argument />
> </arguments>
> }}}
> validates {{{users[*]}}}.
>
> Also, it's inconvenient in a situation like this:
> {{{
> #!xml
> <validator class="and">
>         <arguments base="users[]">
>                 <argument />
>         </arguments>
>
>         <validator class="string">
>                 <argument>name</argument>
>         </validator>
>
>         <validator class="email">
>                 <argument>email</argument>
>         </validator>
>
> </validator>
> }}}
> because what we really want to do is only define the base for the child
> validators. No need to even set an argument (which, however, is ignored
> anyway by operator validators)

New description:

 {{{
 #!xml
 <arguments base="users[]">
   <argument>email</argument>
 </arguments>
 }}}
 validates {{{users[*][email]}}}.

 However,
 {{{
 #!xml
 <arguments base="users[]">
   <argument />
 </arguments>
 }}}
 validates {{{users[*]}}}.

 Also, it's inconvenient in a situation like this:
 {{{
 #!xml
 <validator class="and">
         <arguments base="users[]">
                 <argument />
         </arguments>

         <validator class="string">
                 <argument>name</argument>
         </validator>

         <validator class="email">
                 <argument>email</argument>
         </validator>

 </validator>
 }}}
 because what we really want to do is only define the base for the child
 validators. No need to even set an argument (which, however, is ignored
 anyway by operator validators).

 So we should allow
 {{{
 #!xml
 <arguments />
 }}}

--

-- 
Ticket URL: <http://trac.agavi.org/ticket/1085#comment:2>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5


_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets

Reply via email to