extjs - Display validation errors in a div with extjs4 -
i'm trying add validations form (which has few mandatary fields , few alpha , max length validation). need display error messages(how many might be) in top left of form have div id. i'm not sure start first try validation. 1 post simple example or example in net (i had searched lot not able find match need) can start with...pls help...
links may read :
an example of can (live example here) :
var errors = []; var fields = form.getfields(); // form : ext.form.basic var errorstpl = new ext.xtemplate( '<ul><tpl for="."><li>{field} : {error}</li></tpl></ul>' ); fields.each(function (field) { errors = errors.concat(ext.array.map(field.geterrors(), function (error) { return { field: field.getname(), error: error } })); }); errorstpl.overwrite('myoutputdiv', errors);
Comments
Post a Comment