Description of the problem including expected versus actual behavior:
If not all documents have values for the field which is used in the script, then validation error can disappear or become confusing when navigating between documents for preview. I would expect it get back to the original validation message which was helpful.
Steps to reproduce:
Open "Create field" flyout
Enter a script which uses a field with a missing value for the current document in preview
Navigate to next document in preview (with or without a value for the field) and return to the initial document
Observe that validation message becomes generic or missing.
POST test_this/_doc
{
"message": "hi there"
}
POST test_this/_doc
{
"another_message": "hallöchen"
}
Kibana version: main
Description of the problem including expected versus actual behavior: If not all documents have values for the field which is used in the script, then validation error can disappear or become confusing when navigating between documents for preview. I would expect it get back to the original validation message which was helpful.
Steps to reproduce:
Related: https://discuss.elastic.co/t/runtime-fields-cant-be-saved-because-highlighted-errors-need-to-be-fixed-but-none-are-highlighted/359121