Hi all,
Foreword: the validation of node fields aims to prevent user errors directly at the source. An error field will be marked in red and a message can be given to the user which gives him the where and the why. These two elements are important because without validation, the user will deploy and only after this deployment receive an error that he may not understand.
As you know, TypedInput has its own validation system.
If I call for your feedback, it's because the validation of the node overrides the validation of TypedInput. Lets me explain with the example of a TypedInput field which is of the type msg
. This field therefore has a validator (internal).
If the node does not have a validator for this field, the node will retrieve the result of the validation of TypedInput. Note that this result is only obtained if the DOM element exists!
However, if the node has a validator for this field, TypedInput will validate the input but also the node.
I think the solution would be that the node validation validates the TypedInput fields only when the node configuration is saved. Which means that when the editor is opened, it's the TypedInput validation that is used and when the node is saved, it's the node validation.
Little reminder: the validation of a node can be called for several cases not only when the editor is saved. Filling a field triggers node validation (simplifying the idea in the code).
The problem of this topic concerns only the case where the editor is opened (and saved). Therefore the TypedInput validation is useless because it's overwritten by the validation of the node.
Do you agree with this principle?
Thank you for your feedback.
PS: It's important to resolve the question because this double validation will pose problems in the future. This double validation has always existed but its effects have only been seen since v4 because errors have been fixed.