开发者

JQuery validation with Ruby on Rails

I have a problem with getting the error messages from:

format.json { render json: @contactmail.errors, status: :unprocessable_entity }

to my real-time JQuery validation of some text-fields.

When the JQuery method datatype is set to text it prints out all the html of the page I want to validate after render new page. If datatype is JSON Firebug gives me an error 422 and prints something that resembles objects with my error mess开发者_C百科ages.

Any clue to how to do this the correct way?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜