On 7/9/06, Jorge Godoy <[EMAIL PROTECTED]> wrote:
>
> "Ed Singleton" <[EMAIL PROTECTED]> writes:
>
> > I've having problems putting an optional FileField on my form.
> >
> > If I use:
> > FileField("photo", validator=validators.FieldStorageUploadConverter())
> >
> > and don't enter a photo, then it returns a tg_error of "invalid" for
> > the field (which isn't a helpful error message).
> >
> > If I use:
> > FileField("photo",
> > validator=validators.Any(validators.FieldStorageUploadConverter(),validators.Empty()))
> >
> > then I get the error message below.
> >
> > Any ideas on how to make the field optional, yet vaildate correctly if
> > there is something in it?
>
>
> Hi Ed.
>
>
> I haven't tried it, but what if you use "if_empty = None"?No, that doesn't seem to work. Thanks Ed --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

