[web2py] Re: Database insert of time field in web2py not working?

2013-11-12 Thread User
Just realized I added the following lines after my db.define_table statement: db.sometable.start_time.notnull = True db.sometable.start_time.requires = IS_NOT_EMPTY() I'm thinking that my assignment of IS_NOT_EMPTY() overwrote the default IS_TIME() validator associated with time fields. Doe

[web2py] Re: Database insert of time field in web2py not working?

2013-11-12 Thread Niphlod
requires can be a list of validators. On Tuesday, November 12, 2013 9:32:27 AM UTC+1, User wrote: > > Just realized I added the following lines after my db.define_table > statement: > > db.sometable.start_time.notnull = True > db.sometable.start_time.requires = IS_NOT_EMPTY() > > > I'm th

[web2py] Re: Database insert of time field in web2py not working?

2013-11-12 Thread User
So since a time field automatically has an IS_TIME validator how would you specify additional validators after the db.define_table statement? On Tuesday, November 12, 2013 3:51:12 AM UTC-5, Niphlod wrote: > > requires can be a list of validators. > > On Tuesday, November 12, 2013 9:32:27 AM U

[web2py] Re: Database insert of time field in web2py not working?

2013-11-13 Thread Niphlod
db.table.field.requires.append(what_you_need) On Wednesday, November 13, 2013 6:43:38 AM UTC+1, User wrote: > > So since a time field automatically has an IS_TIME validator how would you > specify additional validators after the db.define_table statement? > > On Tuesday, November 12, 2013 3:51:12

[web2py] Re: Database insert of time field in web2py not working?

2013-11-15 Thread User
Does this need the original validator to have been defined as a list to work? Is there a difference between db.table.field.requires = first_validator and db.table.field.requires = [first_validator] Does your append code work in either case? If there is a difference, when you declare a field

[web2py] Re: Database insert of time field in web2py not working?

2013-11-15 Thread 黄祥
> > Does this need the original validator to have been defined as a list to > work? > it depend, wheter you need 1 validator or more than 1 validator, if more than 1 validator please use list of validators []. > db.table.field.requires = first_validator > use it if you only need 1 validator