0
votes

Does anyone know how to make RowEditor in ExtJS 3.4 show a custom validation message?

E.g., the ExtJS sample (http://dev.sencha.com/deploy/ext-3.4.0/examples/grid/row-editor.html) the first column editor is defined like this:

editor: {
    xtype: 'textfield',
    allowBlank: false
}

With this RowEditor displays a "Field is required" message when this field is empty. I need to replace this message with a custom one, so I change the editor definition:

editor: {
    xtype: 'textfield',
    allowBlank: false,
    invalidText: 'Cannot be empty'
}

but the RowEditor still displays the default message. Any suggestions?

Thank you.

1

1 Answers

2
votes

As your validation is if allowBlank,so you should use the property "blankText",

editor: {
  xtype: 'textfield',
  allowBlank: false,
  blankText: 'Cannot be empty'
}