検証が必要なフォームのモデルを作成しています。
モデルは次のようになります。
//Defining a data structure for the Work Item List
Ext.define('InfoImage.model.configure.configModel', {
extend : 'Ext.data.Model',
config : {
//Defining the fields required in the Work Item List
fields : [ 'servname', 'port', 'protocol', 'username', 'password',
'domain', 'appconfig', 'apptitle',
'appconfig' ],
validations : [
{
type : 'presence',
name : 'servname'
},
{
type : 'presence',
name : 'port'
// matcher : /[0-9]{4}[A-Z]+/
},
{
type : 'presence',
name : 'username'
},
{
type : 'presence',
name : 'password'
}],
proxy : {
type : 'localstorage',
id : 'configId'
}
}
});
検証を呼び出してみました
Ext.getCmp('form').validate();
しかし、検証と呼ばれるメソッドがないと言っています。
sencha は検証方法を提供していますか? はいの場合、どうすればそれを達成できますか?