Re: [web2py] required option in Field

2012-09-05 Thread Marin Pranjić
I don't know why this happens - I always reply from email and it is always in the same thread. Sorry about that. Dana srijeda, 5. rujna 2012. 22:14:09 UTC+2, korisnik Niphlod napisao je: > > IS_NOT_EMPTY() is more "remembereable" . > > @Marin: when you reply from your mail client please strip th

Re: [web2py] required option in Field

2012-09-05 Thread Niphlod
IS_NOT_EMPTY() is more "remembereable" . @Marin: when you reply from your mail client please strip the re: from the subject or in the group it will show as a separate thread. On Wednesday, September 5, 2012 10:07:11 PM UTC+2, Marin Pranjić wrote: > > This should work for other field types as yo

Re: [web2py] required option in Field

2012-09-05 Thread Marin Pranjić
This should work for other field types as you expect, but empty string is still valid string value. You can set: requires=IS_LENGTH(minsize=1) to disallow empty strings. On Tue, Sep 4, 2012 at 7:24 PM, Denis Rykov wrote: > I use the following Field definition: > > Field('admin_unit', required=Tr

[web2py] required option in Field

2012-09-04 Thread Denis Rykov
I use the following Field definition: Field('admin_unit', required=True, label='Region'), But when I create new row through smartgrid interface and leave this field empty - validation error not appears and record creates in database. If see table in database you can see that 'admin_unit' field