Hi, I use exactly the same code as you mentioned:
$(document).ready(function() { $('#registration').ajaxForm({ dataType: 'json', url: '/registration/check/', success: function(data) { alert(data); } } ); But I do not want to show labels by hand and duplicate jQuery's error label showing process. I would rather to parse returned data into some normalized (if any...?) format and this pass to jQuery to show in its proper way. Is there some way how to do it? J. On Sep 27, 2:56 am, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote: > Setup ajaxForm with dataType:"json". Then your success-callback will > get a parsed JavaScript object as the first argument. > > $("#myform").ajaxForm({ > dataType: "json", > success: function(data) { > // iterate over data.messages and display labels? > } > > }); > > Jörn > > On Fri, Sep 26, 2008 at 11:56 PM, jnemec <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > I am going to use server-side Zend_Form data validation process and > > its result show with jQuery. I send form data via ajaxForm(); function > > and Zend controller validates data a returns information about > > validation result in json format: > > > {"status":"error","messages":{"email":{"isEmpty":"Value is empty, but > > a non-empty value is required"},"password":{"isEmpty":"Value is empty, > > but a non-empty value is required"},"password2":{"isEmpty":"Value is > > empty, but a non-empty value is required"},"city":{"isEmpty":"Value is > > empty, but a non-empty value is required"},"zip":{"isEmpty":"Value is > > empty, but a non-empty value is required"},"street":{"isEmpty":"Value > > is empty, but a non-empty value is required"}}} > > > Do anybody know how to parse it a how to display these messages in > > proper form error labels? > > > Thank you, J.