On Feb 7, 3:54 am, Jonathan Lundell <jlund...@pobox.com> wrote: > On Feb 6, 2011, at 11:40 AM, Luther Goh Lu Feng wrote: > > > > > Is there an equivalent > > tohttp://docs.djangoproject.com/en/dev/ref/models/fields/#urlfield > > in web2py? > > > If not, how does one validate an external url that is to be stored in > > the database? > > There are validators, IS_URL and IS_HTTP_URL, that check the syntax but don't > actually do an access. Doing an access with an arbitrary user-entered URL > seems pretty risky.
I see. Thanks! I also noticed that IS_HTTP_URL is not documented in the book (unless I missed it). In case anyone wants to document it http://web2py.com/examples/static/epydoc/web2py.gluon.validators.IS_HTTP_URL-class.html