Hi Massimo --

I think it has to do more with my abuse and misuse of SQLFORM in this case. 
 I think I'm trying to push it a little beyond its intended use model. 
 Niphlod and Anthony have been tutoring me on some approaches.  We have an 
awesome community growing up around web2py and these two are examples of 
the best.

Here is the other post:

https://groups.google.com/forum/#!topic/web2py/SjyPkAPdRPg

-- Joe

On Sunday, August 18, 2013 7:05:00 PM UTC-7, Massimo Di Pierro wrote:
>
> 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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to