I found the issue. Since the format of the date field (same happens for the time field) is a text in sqlite we must postpone to the validator IS_NOT_IN_DB the validator IS_DATE. By setting: db.user_table.birthday.requires=[IS_DATE(), IS_NOT_IN_DB(db, 'user_table.birthday')] everything works as expected even on sqlite. What do you think if we make it as default for date/time fields when the backend is sqlite?
Paolo On Tuesday, July 8, 2014 7:04:44 PM UTC+2, Paolo Valleri wrote: > > What is odd to me is that,on postgres the validator works as expected > while on sqlite it doesnât and it is the backend itself that raises the > exception. > On Jul 8, 2014 6:43 PM, "Anthony" <abasta...@gmail.com> wrote: > >> Are you saying you want an error message to appear on the form? For that, >> you need an IS_NOT_IN_DB validator, regardless of the database backend. >> >> Anthony >> >> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "web2py-users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/web2py/AnmLhKmS8UA/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> web2py+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.