dimanche 11 mai 2014

How model validation can be done?

In ExtJs 4.2 I had the following codes:

Ext.define('Tadkar.users.jsModels.account.SignInModel', {

extend: 'Ext.data.Model',

requires: ['TadkarSoft.extentions.UrlWriter'],

fields: [

{ name: 'Username' },

{ name: 'Password' },

{ name: 'grant_type', defaultValue: 'password' }

],

validations: [

{ type: 'presence', name: 'Username' },

{ type: 'presence', name: 'Password' },

],


proxy: {

type: 'ajax',

url: '/tadkarservices/token',

writer: 'TUrlWriter'

}


});


But these validations don't work inside ExtJs 5.0. How can I solve it?!





Aucun commentaire:

Enregistrer un commentaire