Hi ed,

you can do:

if form.accepts(...):
  if request.vars.toyr<request.vars.fromyr:
    form.errors.toyr='Valid Years: %s - 2000'%request.vars.fromyr
  else:
    # code to handle valid form input here
if form.errors:
  response.flash='please fix errors'
return dict(form=form)

I would also add defaults to the form fields e.g.
Field('toyr',default=request.vars.toyr,...)

and note that your requires should be:
IS_INT_IN_RANGE(1950,2001,...)
to accept numbers up to 2000 included.

Denes.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to