Вопрос

I am locking for way to alert messages in Extjs4 to be just like validator alert ( red label with message beside the text field ).

I cannot use the validator because my error message should appear after press enter not just when type in text field.

Это было полезно?

Решение

You can use the markInvalid method to apply a custom error to a field.

But note that this mark will be cleaned when calling isValid

Другие советы

You should be using the validator like normal, just set validateOnChange: false. The field will still validateOnBlur because that's set to true by default. I believe enter triggers the blur of the field which will in turn validate the field with this change.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top