supported validations. Ext.define('MyApp.model.User', { extend: 'Ext.data.Model', config: { idProperty: 'idUser', fields: [ {name: 'idUser', type: 'int'}, {name: 'name', type: 'string'}, {name: 'age', type: 'int'}, 'phone', 'gender', 'username', {name: 'alive', type: 'boolean', defaultValue: true} ], validations: [ {type: 'presence', field: 'age', message: 'Age is Reqd'}, {type: 'length', field: 'name', min: 2}, {type: 'inclusion',field: 'gender', list: ['Male', 'Female']}, {type: 'exclusion', field: 'username', list: ['Admin', 'Operator']}, {type: 'format', field: 'username', matcher: /([a-z]+)[0-9]{2,3}/, } ] } }); Wednesday, June 5, 13