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

Well define change.

you can define when a form should be revalidated. ExtJS can do the validation when you submit, or when you "tab" to another form field, or while you type, or...

You can even chose whether only a specific field should be validated or all of them.

I don't like the idea of having two languages doing the validation. For thinks like "isBlank" it's fine. But thinks like regular expressions might be hard to translate in javascript.


Amen on that. Perhaps we need something that does as much as possible on clientside, but the rest on serverside.


moritz

Am 05.03.2008 um 10:32 schrieb Andreas Marienborg:

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
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu


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


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


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


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

Reply via email to