On 06/03/2008, Alex Povolotsky <[EMAIL PROTECTED]> wrote:
> Zbigniew Lukasiak wrote:
>  > When you put schema on the form stash it is used as the model:
>  >
>  > $form->stash->{schema} = $c->model( 'DBSchema' );
>  >
>  > This is from my app.
>  >
>
> Thanks; looks like I've got some trouble with my model, but I've got the
>  idea.
>
> >
>  >>  2. Can I somehow make simple validation of password (usual two fields,
>  >>  matching each other) using HTML::FormFu?
>  >>
>  >
>  > See HTML::FormFu::Constraint::Equal
>  >
>
>
> Looked at it. Understood nothing. Can't you please supply me with more
>  complete example?

The docs describe the exact solution you requested.

SYNOPSIS

    type: Equal
    name: password
    others: repeat_password

DESCRIPTION

All fields named in "others" must have an equal value to the field
this constraint is attached to.


To spell it out...

    elements:
      - type: Password
        name: password
        constraints:
          - type: Equal
            others: repeat_password
      - type: Password
        name: repeat_password

Carl

_______________________________________________
HTML-FormFu mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to