View Full Version : vtype validation error on initial / default value

18 Jun 2009, 7:23 AM
Hi anyone,

I have strange problem with a textbox with an initial value when adding a vtype behaviour:
(running on ext3r2)

xtype: 'textfield',
allowBlankText: 'enter at least 5 characters',
minLengthText: 'enter at least 5 characters',
name: 'desc1',
value: '<?php echo $cmdesc; ?>',
fieldLabel: 'Description 1',
style: { textTransform:"uppercase" },
//vtype: 'as400part',
anchor: '95%'


Ext.apply(Ext.form.VTypes, {
'as400part': function(){
var re = /^[A-Za-z0-9.,_+*#<>&[email protected] -]*$/;
return function(v){
return re.test(v);
'as400partText' : 'wrong characters in input!'

This vtype works without any problem when having a textbox without an initial value...
I need this vtype behaviour to verify changes in in the initial value (for example getting initial value from database for update)

any idea where the problem is???
thanx in advance.