Thanx. Nice solution On Monday, December 1, 2014 2:46:24 PM UTC+1, Anthony wrote: > > You can either use an onvalidation function or do something like: > > Field('end1', requires=IS_NOT_EMPTY() if request.post_vars.start1 else > None) > > Anthony > > On Monday, December 1, 2014 8:27:30 AM UTC-5, Yebach wrote: >> >> Hello >> >> I have a SQLFORM.grid and I have to raise error for user if he inserts >> value into one field and not another. >> >> Example >> >> start 1 10:00 >> end 1 12:00 - has to show error if field is empty - >> >> start 2 16:00 - not necessary to be inserted >> end 2 20:00 - has to show error if start 2 is not empty >> >> What would be the best solution? >> >> Thank you >> >> >>
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.