Hello.
Field('avatar', 'upload', required=False, autodelete=True, label=T('Avatar'),
uploadfolder=os.path.join(request.folder, 'static/images/avatars'),
requires=[IS_LENGTH(16384), IS_IMAGE()])
Well, the logic is simple: "avatar is not necessary, but when it uploaded, it must be image size of <= 16KiB".
But I can not submit form without image uploading, error is "Invalid Image" always. I can submit form only if image of proper size.
When I remove IS_IMAGE() check, it works as expected - I can submit form without file, or with file size of 16KiB max.
Is it a bug or I do not understand something?