On 12/11/13 14:42, Ian Dickinson wrote:
Hi Andy,
Can we have the various /validate/* methods return JSON when
application/json is requested? I'm replicating the behaviour of the
current validation forms, but I'd like to do them as Ajax requests and
display the results in a codemirror box. So all a JSON API needs to
return is the validation output.
Thanks,
Ian
Hi Ian,
Sure - the error reports are just the outputs of the underlying parser
for whatever is being validated so while it's big strings of the
formatter and error message it's simple to do. I might be able to grab
the line/column as well (can't remember is that's separately available
by the time the exception bubbles up).
Andy