> 1. notnull=True is not work without requires=IS_NOT_EMPTY()
> during my testing is on field note, i define notnull=True on field note, 
> but i forgot to define the requires, yet the data still can be insert 
> without note=null
>

If you leave the "note" text field empty, I think it will insert an empty 
string (i.e., "") rather than a NULL, so notnull=True will not trigger an 
error in that case.
 

>
> 2. length is not work without requires=IS_LENGTH()
> during my testing is on field uuid because i don't know the actually 
> length of date+uuid string that will generated, at first i think 32 length 
> is enough, after i disable length and generate it, it take 47 length, so 
> that i post it in here
>

As noted, SQLite does not enforce string field length, so inserting strings 
longer than your defined length will not trigger an error in that RDBMS.
 

> 3. uuid is not work in unique=True
> the result for invoice no when i submit from web form which is uuid can't 
> be insert when i set unique=True. when i remove unique=True and tried to 
> refresh and resubmit my data again, it can be inserted.
>

Is it possible you already have duplicate data in that column (e.g., 
perhaps multiple empty strings)? What happens if you start with a fresh 
application and database?

Anthony

-- 

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