How do I define texfield validator scope?
I define validator in controller with this code:
this.editView.getRegNumberTextField().validator = this.regNumberValidator;
//...
regNumberValidator:function (input) {
//validation here
}
But in this case the scope in regNumberValidator function is RegNumberTextField. I want it to be the Controller scope. I tried Ext.apply with {scope:this} but it didn’t help. There should be some way to define the scope, like in on('event',handler, scope) statement.
The solution to my problem is Ext.bind
The code is: