View Full Version : [CLOSED][3.??] property "errorReader" is bug?

Perfect Lion
13 Jan 2010, 3:48 AM
Hi staff,

I'm with a problem with this propertie is not working the mapping my response the server.


This is my submit config:

clientValidation: true
, errorReader: new Ext.data.JsonReader({
root: 'errors.fields'
, fields: ['id','msg']

This is my json response of server:

{success: false, errors: {fields: [id:'username', msg:'Invalid Username']}}

This my field:

fieldLabel: 'Username'
, name: 'username'
, id: 'username'
, allowBlank: false

What problem for not checking warning in field?

13 Jan 2010, 4:07 AM
That's not valid JSON. You are missing some {brackets}.

{success: false, errors: {fields: [{id:'username', msg:'Invalid Username'}]}}

Perfect Lion
13 Jan 2010, 5:54 AM
hahahaha Condor - sorry i copy and past wrong for in the post.

{success: false, errors: {fields: [{id:'username', msg:'Invalid Username']}}}

Now it correct.

What problem with this function? It's bug of EXTJS 3.1.0?

13 Jan 2010, 6:10 AM
errorReader is a config option of the form and not a parameter in the submit() method!

Perfect Lion
13 Jan 2010, 7:44 AM
Thanks a lot Condor.. I configured in function submit because I saw this config in class: