turns out string, double, date, datetime and time all have default
validators.

On Sep 4, 3:11 pm, waTR <r...@devshell.org> wrote:
> What was throwing me off was that one of the fields (type DOUBLE),
> doesn't allow user to leave it blank. So SQLForm prevents continuation
> until you enter some value for the DOUBLE field. Even though it has no
> validators attached to it nor does it have notnull=True. That really
> threw me off... is that normal for the form to behave that way?
>
> ie.
>
> db.define_table(test, SQLField(name), SQLField(age, double,
> default=none))
>
> def index():
> form = SQLForm(db.test)
> return dict(form=form)
>
> On Sep 4, 1:04 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > Not sure I understand. notnull=True is different from
> > requires=IS_NOT_EMPTY(). The former is enforced by the database, the
> > latter bu the SQLFORM. You need both.
>
> > Massimo
>
> > On Sep 4, 2:21 pm, b00m_chef <r...@devshell.org> wrote:
>
> > > I setup a model using sql light default db. I then built a simple
> > > SQLForm. However, when I change a field in the model to notnull=True,
> > > the SQLForm still processes the form as though it was False. That is
> > > until I delete the files in the database folder in web2py, and close
> > > and re-open web2py.app
>
> > > Is that normal behaviour? Is there a better way to update the model
> > > and have the changes function?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to