You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing schema validation, it is useful to know what went wrong in a very easy way. For example if you have the schema:
field:
type: stringrequired: true
But you do not pass this field, you would see that the validation has failed. It would be extremely hard to know why the validation failed. Was it because the type was invalid or the field was missing all together? Currently, if you wanted to know you would have to parse the error messages:
Instance does not have required property \"" + key + "\"" <--- Required but missing "Instance type " + instanceType + " is invalid. Expected " + schema.get("type") <--- The type is invalid
I think adding a new Enum valid to describe the error type would be extremely helpful.
Use cases
Since the program knows why the validation failed, it can gracefully catch the exception and pass that on to the end user in a cleaner fashion.
Contribution
Who should implement this feature ? are you volunteering for implementing this feature or
do you know that is able and willing implement this feature ?
The text was updated successfully, but these errors were encountered:
Describe the feature
When doing schema validation, it is useful to know what went wrong in a very easy way. For example if you have the schema:
But you do not pass this field, you would see that the validation has failed. It would be extremely hard to know why the validation failed. Was it because the type was invalid or the field was missing all together? Currently, if you wanted to know you would have to parse the error messages:
Instance does not have required property \"" + key + "\""
<--- Required but missing"Instance type " + instanceType + " is invalid. Expected " + schema.get("type")
<--- The type is invalidI think adding a new Enum valid to describe the error type would be extremely helpful.
Use cases
Since the program knows why the validation failed, it can gracefully catch the exception and pass that on to the end user in a cleaner fashion.
Contribution
Who should implement this feature ? are you volunteering for implementing this feature or
do you know that is able and willing implement this feature ?
The text was updated successfully, but these errors were encountered: