我正在尝试使用record.getValidation()Uncaught TypeError: factory is not a function(…)
下面是我的代码,Ext js verison是6.0.2
Ext.define('Student', {
extend: 'Ext.data.Model',
idProperty: 'Id',
fields: [{
name: 'Id',
type: 'int'
},
'firstName',
'lastName'
],
validators: {
firstName: 'presence',
lastName: {
type: 'length',
min: 2
}
}
});
var studentRecord = Ext.create('Student', {
firstName: '',
lastName: 'J'
});
var validation = studentRecord.getValidation();
以上行导致错误,出厂不是一个功能。请帮助我。