ExtJS


Ext.apply(Ext.form.VTypes, {
            'phone': function () {
                var re = /^[\(\)\.\- ]{0,}[0-9]{3}[\(\)\.\- ]{0,}[0-9]{3}[\(\)\.\- ]{0,}[0-9]{4}[\(\)\.\- ]{0,}$/;
                return function (v) { return re.test(v); };
            }(), 'phoneText': 'The phone number format is wrong, ie: 123-456-7890 (dashes optional) Or (123) 456-7890',
            'fax': function () {
                var re = /^[\(\)\.\- ]{0,}[0-9]{3}[\(\)\.\- ]{0,}[0-9]{3}[\(\)\.\- ]{0,}[0-9]{4}[\(\)\.\- ]{0,}$/;

ExtJS doesn't have any native method to print content but we can do it easily in the following way -

Lets have a panel with some html content and a print button -

Subscribe to RSS - ExtJS