Not sure, but I think you need to specify a form object in order to use .accepts to validate
from the book: All the work is done by the accepts method of the form object. It filters the request.varsaccording to the declared requirements (expressed by validators). accepts stores those variables that pass validation into form.vars. If a field value does not meet a requirement, the failing validator returns an error and the error is stored in form.errors. Both form.vars andform.errors are gluon.storage.Storage objects similar to request.vars. So: You can try to create a form object using form = SQLFORM <http://web2py.com/book/default/docstring/SQLFORM>.factory But, this form created by .factory needs to have the same model as the one you created in raw html. you can try to loop the request.vars to build a instance of form object with the validators that you want, then you will be able to use .accepts() I am really not sure, But by now, I think it is the only way. 2010/10/19 Bruno Rocha <[email protected]> > What is the name of the form, really? > > Which one you specified in <form name=""> does not works? > > 2010/10/19 weheh <[email protected]> > > If I build a form comprising a few raw html input fields and then use >> ajax to submit them, their values end up in request.vars. Now, I would >> like to use my_html_form.accepts(...) to process the contents, but is >> that possible? What is the name of the form, really? >> > > > > -- > > http://rochacbruno.com.br > -- http://rochacbruno.com.br

