On 20/05/07, Jorge Godoy <[EMAIL PROTECTED]> wrote: > You can validate the minimum with FormEncode as you'll see on most > tutorials and documents online, you can also write a custom validator > and use it the same way you use a common and standard validator. You > can also do it by hand in your controller and return the message somehow > to the user (JSON, redirect, etc. you choose). > > The recommended and more reusable way is with a custom validator. The > fastest way is with code on your controller. > What's nice about the built in form validation is that it keeps the values that the user has already wrote, so he doesn't have to type it all over again, and shows an error message near the problematic field. Is there a simple way for me to do it too?
I saw now the document http://docs.turbogears.org/1.0/RoughDocs/FormValidationWithSchemas . However, I don't want to write a custom validator to check that a user name isn't being used already. The reasonable way is to do it in the addUser method. I can redirect back to the form, I just don't know how to keep the values that the user has already wrote. Thanks, Noam --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

