Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top