"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"? 


Be seeing you,
-- 
Jorge Godoy      <[EMAIL PROTECTED]>

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

Reply via email to