Alexandre Neukirchen Alexandre Neukirchen - 6 months ago 36
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?


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;