[html-formfu] Validation

Zbigniew Lukasiak zzbbyy at gmail.com
Wed Jun 13 16:32:59 GMT 2007


On 6/13/07, Carl Franks <fireartist at gmail.com> wrote:
> You'd have to look at breaking the validation out, so it could be used
> without a form object.
That is exactly my question.

Here is how I would imagine it.  To do the validation all I need is a
hash with the params:
{
    param1 => value1,
    param2 => value2,
    param3 => value3,
}
With valuex filled by the previous steps (Inflators etc).

And the output of it could be something similar:
{
    param1 => { status => 'OK' }
    param2 => { status => 'Error', message => 'number too big' }
    param3 => { status => 'OK' }
    all_params => { status => 'Error', message => 'passwords don't match' }
}

So what I am asking is about making a similar protocol so that non
FormFu component could be easily integrated.

I am asking that question because for now (untill FormFu is released)
I'll have to stick to Data::FormValidator for the validation part and
this would open for me the path to upgrade to FormFu in the future.
And I think I am not in such a unique position here.


-- 
Zbigniew Lukasiak
http://brudnopis.blogspot.com/



More information about the HTML-FormFu mailing list