[Catalyst] Design of a new form validator
Sebastian Riedel
sri at oook.de
Thu Dec 1 09:37:02 CET 2005
Am 01.12.2005 um 08:13 schrieb Yuval Kogman:
> On Thu, Dec 01, 2005 at 00:15:17 +0100, Sebastian Riedel wrote:
>> [% form.as_xml %]
>>
>> [% FOREACH element = form.errors %]
>> <p>
>> [% element %]:<br/>
>> <ul>
>> [% FOREACH message = form.messages(element) %]
>> <li>[% element %]:</li>
>> [% END %]
>> </ul>
>> </p>
>> [% END %]
>
>
> Please also add
>
>
> $form->integrated_errors(1);
>
> [% form.as_xml %]
>
> should allow you to just style
>
> .error {
> border: 1px solid red;
> }
>
> and get small div or something around the actual form element, with
> the error text just before or after the <input>.
>
> Another thing to add is to please please please allow:
>
> 1. good default error strings (validators know how to compose
> error messages with each other)
>
> 2. as_xml should be easily broken up so that you can layout your
> form more freely:
>
> iterate elements by order
>
> extract elements by name
>
> be able to compose groups of elements, and iterate those
All implemented in the new snapshot. :)
--
sebastian
More information about the Catalyst
mailing list