notnull = True is enforced at the level of the database and the field
value cannot be None/NULL
requires=is_not_empty() is enforced in forced in forms ate web2py
level

required=True is completely different. It has nothing to do with the
field value. It requires that a value always be specified in
db.table.include(...) even if the field has a default or a computed
attribute. It is a measure to prevent some programming errors. I never
use it myself.


On May 1, 7:42 am, 黄祥 <steve.van.chris...@gmail.com> wrote:
> hi,
>
> is there anybody know the difference between is_not_empty(),
> notnull=true and required=true?
> should i use both or just 1 of it's?
> please give an advice or pointer about this
>
> thank you so much in advance

Reply via email to