custom validator severity #369
Replies: 4 comments
-
That is a good suggestion indeed, it would be nice to be able to specify the severity coming out of the validator. Right now, the data models already have a svelte-jsoneditor/src/lib/types.ts Lines 154 to 164 in f70a602 So we should reflect the severity in the rendered validation error table and the inline warning icons (both in Help implementing this would be welcome! |
Beta Was this translation helpful? Give feedback.
-
If the ui reflects this point, it will be of great help in using the inspection. Thank you for listening to me. |
Beta Was this translation helpful? Give feedback.
-
Moving this idea to the Discussions > Ideas section since we are not actively working on it. Help implementing this would be welcome. |
Beta Was this translation helpful? Give feedback.
-
This has been implemented now in |
Beta Was this translation helpful? Give feedback.
-
I'd like to ask you one more question. The example you
example provided in the last question made it possible to use a custom validator.
However No matter what value is delivered as a key value of severity to the validation of the currently customized guidance message, it is output like the yellow "warning" format. As before, I want to pass values like "info", "warning", "error" etc to isolate fatal errors and make them noticeably reddish.
I wonder if I should deliver a value other than "info", "warning", and "error" to the severity key of the customized inspector or not.
Beta Was this translation helpful? Give feedback.
All reactions