-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support of typeField property validation message #4450
base: dev
Are you sure you want to change the base?
Add support of typeField property validation message #4450
Conversation
I'm going to check that 🤔 |
Regarding your second question, typedInput has an internal validator but it is not directly linked to node validation. If typedInput uses its default validators, only a custom validation (Regex rules for example) in the node will add an error to the field. In the other case, the node validation will retrieve the result from typedInput. I grant you that we do the job twice for the "top" elements but these elements can be defined differently - the "safest" behavior (in the sense of validating the node) being to validate it on both sides. |
Ok, I added a rule that lets validate by typedInput if there is no node validation for the property. |
Proposed changes
This PR is an extension of #4449 and was discussed inside.
If an input is builded with typedInput and contains the typeField option:
and node properties contains a validator for typeField:
This PR adds a validation tooltip message to the field if the typeField validation is not correct.
In the example, validation only accepts the type
str
notmsg
:Note: the message on the screenshot is not the message that the example should produce
Checklist
npm run test
to verify the unit tests pass