@Arian, I can display the message directly however the user will still be able to submit the form if the code is wrong;
@Aaron, I'm not really sure how to implement that. @Arian, @Aaron, Will it work if I use Request instead of Request.JSON and set the async option to false? Thanks in advance or your help. PS: I've tried to attach another onSubmit event to the form to check for the captcha code before validating the form, but that did not work as expected; On Aug 17, 11:32 pm, Aaron Newton <[email protected]> wrote: > This is what I do. It's also possible to write it so that your request is > not asynchronous but that's not ideal. > > If you write a validator that always returns true but fires off your > Request, then the request handler invokes the form validator methods to show > error messages you get some of the magic, but it's not straight forward... > > > On Wed, Aug 17, 2011 at 7:21 PM, Arian Stolwijk <[email protected]> wrote: > > That's a architectural problem of Form.Validator that it doesn't support > > asynchronous validators. You probably should write code which might call > > some methods of Form.Validator to show the results or just shows some > > message directly. > > > On Thu, Aug 18, 2011 at 4:13 AM, Doug <[email protected]> wrote: > > >> The validation does not work if I use Request.JSON inside > >> FormValidator test method; > > >> I need to use to validate captcha image code before form submission. > >> Please see example here: > >>http://jsfiddle.net/machadoug/ve2br/16/ > > >> Thanks in advance for your help.
