Alexandre Neukirchen Alexandre Neukirchen - 1 month ago 6
Javascript Question

Prototype setValue function of the ExtJS

I have some programs and would like to put a validation whenever set to the text of a textfiled.
How to override the setValue function ExtJS?

Answer

You can try something like this:

Ext.form.field.Text.prototype.setValue = function(val) {
    var me = this,
        inputEl = me.inputEl;

    // Here your validation 

    return me;
};