Can you post some code so we can reproduce it?  This should not be 
happening. In fact the first line of the IS_LENGTH.__call__ validators 
check for value == None and assumes length == 0

On Sunday, 18 August 2013 15:42:31 UTC-5, Joe Barnhart wrote:
>
> I'm having problems with some automatic validators being set on my tables. 
>  I have fields which are optional, they are NOT set as "notnull=True" and I 
> did not provide anyvalidator -- but I DID set a length for the field, as is 
> good practice for most databases.
>
> It appears those fields are being set with an automatic validator for 
> field length, and as a consequence they are behaving as though they are 
> "required" fields.  I get an error if the field is left empty during the 
> validation phase of my form.  I can null out this automatic validation by 
> setting requires=[] on each field, but I have something like 50 fields in 
> this table.  They are not all string fields, either, so a blanket 
> requires=[] would probably screw up some of the fields.
>
> Is there a way to make the automatic validators for length handle 
> IS_EMPTY_OR correctly for fields that may be empty?
>
> -- Joe
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to