Change the return type of a validation result from a simple text message to a ValidationResult object. The ValidationResult object has a message property, but also has a type property (violation, warning, requirement, information), a code (e.g. field-validation-error, permit-type-unknown), and an optional reference to the offending field name.
Fixes # ORV2-2222
Type of change
[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
How Has This Been Tested?
[X] Unit tests created for testing different scenarios with ValidationResult objects - verify the correct properties are returned
Description
Change the return type of a validation result from a simple text message to a ValidationResult object. The ValidationResult object has a message property, but also has a type property (violation, warning, requirement, information), a code (e.g. field-validation-error, permit-type-unknown), and an optional reference to the offending field name.
Fixes # ORV2-2222
Type of change
How Has This Been Tested?
Checklist
Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are promoted to: