On 4/6/06, Michele Cella <[EMAIL PROTECTED]> wrote:
> I think we can safely add a default validator that works with not_empty
> = False (like I'm going to do with the SelectionField), if you want the
> field required you can pass the same validator with not_empty=True, for
> the moment I think this is a good solution, later on we may add a
> parameter but ATM this seems not too DRY to me. ;-)

I can see plenty of cases where a file field is either required or
not. (Creating a profile with the possibility of a picture -- not
required. Adding an attachment to a wiki page -- required.) Making it
easy to do required/not required seems like a good idea. If there are
other frequently modified parameters on the validatior, then I would
think that replacing the validator's a good way to go. But if the only
likely toggle is required/not-required it seems like it's better to
offer that specific switch when creating the field.

Kevin

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

Reply via email to