On Tue, Dec 6, 2011 at 7:04 PM, Anthony Bastardi <[email protected]> wrote: > What happens if you reverse the order of the validators: > > Mytable.payday.requires = [ > IS_IN_SET(G_DAYS_AVAILABLE, error_message="Choose one day"), > IS_INT_IN_RANGE(0,31)]
Anthony, the book says if I want an integer field, I must put IS_INT_IN_RANGE() before IS_IN_SET(). Otherwise, the content will be a string. > Or what happens if you leave out the IS_INT_IN_RANGE validator altogether? Actually, I solved this problem with just IS_IN_SET(). I made a typecasting before inserting data in database, because I'm using SQLFORM.factory(). But, if I was using just SQLFORM, this error could not occur, right? Or it is a bug and need a correction. Or the book needs to be updated, to strip out that part about the 2 validators to get an int field. -- Vinicius Assef.

