Alberto Valverde wrote: > Yep, we don't need a validator for strings, but the point is that we > need some way to tell generate_schema to know which fields expect > input. This is so we can make stricter checks at the Schema (like > filter_extra_fields=True and allow_extra_fields=False) by default and > make sure no spurious variables reach the controller. > > This is not needed when there are no nested widgets as the method's > signature won't match (unless they have **kw), but it's needed for > extra safety at nested widgets IMO. I explain better in another post > at this thread how a spurious var could slip in... > > The problem is that all fields that expect input should have a > validator, even a do nothing validator (for strings) so the schema > knows when an extra variable is being sent. I don't see as a problem > really as it makes more explicit which widget's are for input and > which aren't and enforces the good practice of validating every > single variable that get's in to an app.
Maybe we can assign by default into the Widget class a default String or Null validator, so the user doesn't need to pass it, then we override it with the passed one if specified. What do you think? Ciao Michele to me... Kevin, where are you? :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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-trunk -~----------~----~----~----~------~----~------~--~---
