http://web2py.com/books/default/chapter/29/06
*Notice that requires=... is enforced at the level of forms, required=Trueis enforced at the level of the DAL (insert), while notnull, unique and ondelete are enforced at the level of the database. While they sometimes may seem redundant, it is important to maintain the distinction when programming with the DAL.* On Friday, February 22, 2013 4:16:45 PM UTC+1, 黄祥 wrote: > > hi, > > i found similarities in some of database validator and field constructor, > should i use all of the similar function or not? which is better in > controllers side or in models side? > > for example for similarities > required=True similar with notnull=True and requires=IS_NOT_EMPTY() > length=10 similar with requires=IS_LENGTH(minsize=10)) > unique=True similar with requires=IS_NOT_IN_DB() > > please correct me if i'm wrong > > thanks a lot in advance > -- --- 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.

