Thank you so much! That worked like a charm :). I'm guessing this type of
construct is valid for other validators as well?
On Tuesday, March 27, 2012 5:57:28 PM UTC-7, Anthony wrote:
Try
IS_EMPTY_OR(IS_IMAGE())
Anthony
On Tuesday, March 27, 2012 7:12:45 PM UTC-4, Peter G. wrote:
On Wednesday, March 28, 2012 5:34:05 AM UTC-4, Peter G. wrote:
Thank you so much! That worked like a charm :). I'm guessing this type of
construct is valid for other validators as well?
Yes, it's documented here:
http://web2py.com/books/default/chapter/29/7#Validators
Thanks for the code snippets Anthony--but a minor caveat I didn't realize
ahead of time is that the user is free to either upload an image or not. If
the user does not upload an image, the IS_IMAGE() validators barks at the
user. Is there a easy way of implementing such a logic: if a file is
Try
IS_EMPTY_OR(IS_IMAGE())
Anthony
On Tuesday, March 27, 2012 7:12:45 PM UTC-4, Peter G. wrote:
Thanks for the code snippets Anthony--but a minor caveat I didn't realize
ahead of time is that the user is free to either upload an image or not. If
the user does not upload an image, the
On Thursday, March 22, 2012 6:09:25 PM UTC-4, Peter G. wrote:
I'm using the auth.settengs.extra_fields to add an extra upload field for
the user to upload an avatar, how can I add an IS_IMAGE validator to the
upload field so that the user can't upload random files?
When you define the
5 matches
Mail list logo