[html-formfu] Clientside validation

Andreas Marienborg omega at palle.net
Wed Mar 5 09:32:49 GMT 2008


So you process the complete form on each change in a field?

- andreas

On Mar 5, 2008, at 10:16 AM, Moritz Onken wrote:

> Hi,
>
> I'm using the extJS framework in combination with formfu. It allows  
> you to send the form data to your server and parses the returned  
> messages and prints them next to invalid form fields. It is JSON  
> based, but with a little bit of code you can easily return the  
> formfu error messages usign JSON.
>
> if ( $form->has_errors ) {
>  $c->stash->{success} = 0;
>  for ( @{ $form->get_errors } ) {
>     push(
>       @{ $c->stash->{errors} },
>       { id => $_->name, msg => $_->message }
>     );
> }
>
> this is a catalyst example. Make sure to set the view to JSON.
>
> Am 05.03.2008 um 10:07 schrieb Andreas Marienborg:
>
>> Has anyone done any clientside validation with FormFu? Basicly I  
>> want to only specify constraints etc once, in the FormFu-config,  
>> and then just have it magicaly work on the forms in the web app, or  
>> atleast provide me with the information needed to do the client  
>> side stuff (like what constraints are on a field etc).
>>
>> If that is not possible, is it possible to process only "part" of a  
>> form? So I can call back to the server to check each field as they  
>> are filled out?
>>
>>
>> If anyone has any thoughts on any of this, I would be glad to hear it
>>
>>
>> - andreas
>>
>>
>> _______________________________________________
>> HTML-FormFu mailing list
>> HTML-FormFu at lists.rawmode.org
>> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.rawmode.org
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu




More information about the HTML-FormFu mailing list