>From: [email protected] [mailto:[EMAIL PROTECTED]
>On Behalf Of Diez B. Roggisch
>Sent: Wednesday, August 20, 2008 12:17 PM
>To: [email protected]
>Subject: [TurboGears] Re: Should a validator check parameters agains the
>database?
>
>> So if you try to validate ids, then use the validator to transform
>these
>> ids into model objects. Else you gain next to nothing because the id
>could
>> be deleted in the db by the time your code enters your controller
>function.
>
>It gets even easier:
>
>class ModelValidator(Int): [...]
>
>it subclasses the Int-validator (because we want its behavior first),
>and then tries to resolve for a passed model-object.

>From the next version of FormEncode on you could use the new Pipe() validator.

-- Mark


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to