I've created a MessageBox that allow user to input some text:
Ext.MessageBox.show({
title : 'Reason',
msg : 'Your reson:',
width : 300,
buttons : Ext.MessageBox.OKCANCEL,
multiline : true,
scope : this,
fn : function(btn, reason){ if (btn == 'ok' && reason != '') this.rejectPlan(rec, reason);}
});
User sees it and is allow to enter his reason, but now all I can do is verify if text he entered is not empty.
I would like to block OK button untill user enters some text (lets say minimum 20 characters)
Can I add validator to MessageBox or do I must create custom component extending window?