2
votes

Iam using Ext3.3 In my application iam design email field in composite field,So when set vtype:email,its not shows error icon ,its shows only redline in txtfield And also how to write custom validations in ExtJS like Phone numbers and numaric values

Please help me

when iam using

Ext.apply(Ext.form.VTypes, {
    phone: function (value, field) {
        debugger;
        return value.replace(/[ \-\(\)]/g, '').length == 10;
    },
    phoneText: 'Wrong phone number, please make sure it contains 10 digits',
    phoneMask: /[ \d\-\(\)]/
});

its shows an error object does not support this property

Thanks in advance

1

1 Answers

2
votes

use msgTarget : 'side' for the field to see the error icon.

See here for a list of vtypes : http://www.sencha.com/forum/showthread.php?4271-More-VTypes!