bcgov / onroutebc

Automated Commercial Vehicle Permitting System
Apache License 2.0
5 stars 2 forks source link

feat: Change policy validation result from string to object #1450

Closed john-fletcher-aot closed 3 months ago

john-fletcher-aot commented 3 months ago

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:

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed for 'onroutebc vehicles'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud