ayuda con vtype
hola tengo el siguiente vtype:
var timeTest = /^[A-Za-z0-9\-\_\ ]+$/;
Ext.apply(Ext.form.VTypes, {
// vtype validation function
txtfilter: function(val, field) {
return timeTest.test(val);
},
// vtype Text property: The error text to display when the validation function returns false
txtfilterText: 'Error de Sintaxis',
// vtype Mask property: The keystroke filter mask
txtfilterMask:/[A-Za-z0-9\_\ ]/i
});,
selo asigno a mi textfield:
this.txtNombrePer = new Ext.form.TextField({
id :"txtNombrePer",
fieldLabel:"Nombre",
maxLength:100,
maxLengthText:'Excedio el numero de Caracteres Permitidos',
width:200,
vtype:'txtfilter',
allowBlank:false
});
cuando le asigno un valor al textfield me marca un error :b[this.vtype] is not a function
cuando hago esto: this.txtNombrePe.setValue('hola');
alguien puede ayudarmeHola frank, has verificado que tu vtype sea creado antes de tu TextField?, porque cuando lo creas después no lo reconoce.
¿Conoces a alguien que pueda responder esta pregunta? Comparte el link en Twitter o Facebook
Es necesario registrarse para poder participar en el foro! Si ya tienes una cuenta puedes entrar y comentar en este foro.
