"Michele Cella" <[EMAIL PROTECTED]> writes: > TextField(validator=Int()) -> field not required > TextField(validator=Int(), is_required=True) -> field required > TextField(validator=Int(not_empty=True)) -> field_required > TextField(validator=Int(not_empty=True), is_required=False) -> > field_required > > Opinions on this? I don't like the last one but I can't see anything > better as a solution.
I'd throw an exception on the last case. It is never good to make assumptions on what the developer wanted to do. Something like what the error_handler does for ambiguous handlers. At least, this proposal of yours represents the safest case: in doubt be strict. :-) But I'd still prefer raising an exception here. -- Jorge Godoy <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
