-
Notifications
You must be signed in to change notification settings - Fork 0
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
As a dev performing validation, if the validation manifest is invalid then I want to see an appropriate error #33
Labels
enhancement
A new feature or capability
Comments
craigfowler
changed the title
Alter validation run builder to exclude duplicate runnable rules
When creating a validator from a validation manifest, if the manifest contains duplicate rules then it should throw an exception
Nov 4, 2021
This comment was marked as outdated.
This comment was marked as outdated.
craigfowler
changed the title
When creating a validator from a validation manifest, if the manifest contains duplicate rules then it should throw an exception
As a dev performing validation, if the validation manifest is invalid then I want to see an appropriate error
Apr 22, 2022
Blocked by #52 because a validation manifest is a recursive object model. |
I'd like to make this a "testing" method exposed by the validator factory. I think that it would be onerous to "validate the validator" every time validation occurs. Instead, by putting that functionality upon the validator factory, the consumer can choose whether to do it or not. |
craigfowler
added a commit
that referenced
this issue
Jul 2, 2022
craigfowler
added a commit
that referenced
this issue
Jul 2, 2022
craigfowler
added a commit
that referenced
this issue
Jul 2, 2022
This comment was marked as outdated.
This comment was marked as outdated.
craigfowler
added a commit
that referenced
this issue
Feb 2, 2023
craigfowler
added a commit
that referenced
this issue
Feb 2, 2023
craigfowler
added a commit
that referenced
this issue
Feb 2, 2023
This is a prerequisite to writing a validator-validator.
craigfowler
added a commit
that referenced
this issue
Feb 2, 2023
craigfowler
added a commit
that referenced
this issue
Feb 2, 2023
Also add a couple of extra standard rules (enum constants).
craigfowler
added a commit
that referenced
this issue
Feb 2, 2023
This allows a validator builder to import rules for validating its base type. Also fix issue with manifest.
craigfowler
added a commit
that referenced
this issue
Feb 2, 2023
craigfowler
added a commit
that referenced
this issue
Feb 3, 2023
craigfowler
added a commit
that referenced
this issue
Feb 4, 2023
craigfowler
added a commit
that referenced
this issue
Feb 4, 2023
craigfowler
added a commit
that referenced
this issue
Feb 4, 2023
This is just the first test, to prove that in a "happy path" scenario, the validator-validator can validate itself.
craigfowler
added a commit
that referenced
this issue
Feb 5, 2023
craigfowler
added a commit
that referenced
this issue
Feb 5, 2023
craigfowler
added a commit
that referenced
this issue
Feb 5, 2023
craigfowler
added a commit
that referenced
this issue
Feb 5, 2023
craigfowler
added a commit
that referenced
this issue
Feb 5, 2023
craigfowler
added a commit
that referenced
this issue
Feb 5, 2023
craigfowler
added a commit
that referenced
this issue
Feb 5, 2023
Note that Validation has its own Parallelizable attribute, easy to mudle them up!
craigfowler
added a commit
that referenced
this issue
Feb 5, 2023
craigfowler
added a commit
that referenced
this issue
Feb 5, 2023
craigfowler
added a commit
that referenced
this issue
Feb 5, 2023
craigfowler
added a commit
that referenced
this issue
Feb 5, 2023
craigfowler
added a commit
that referenced
this issue
Feb 11, 2023
This removes all of the class inheritance from the Validation Manifest object model (I will do the Manifest Model later). This is done to make it easier to deal with recursive manifest items. It will now be easier to create: * Recursive collection items * Recursive polymorphic types
craigfowler
added a commit
that referenced
this issue
Feb 11, 2023
craigfowler
added a commit
that referenced
this issue
Feb 11, 2023
This moves the assembling of manifest items into a context class, rather than trying to do it inside the builders.
craigfowler
added a commit
that referenced
this issue
Feb 11, 2023
craigfowler
added a commit
that referenced
this issue
Feb 11, 2023
The validation-manifest validator needs review, because the object model has changed somewhat since it was first designed. Also, I am unaware of my current test coverage %. This commit should successfully build though.
craigfowler
added a commit
that referenced
this issue
Feb 11, 2023
craigfowler
added a commit
that referenced
this issue
Feb 12, 2023
This marks up some non-implemented functions, so SonarCloud reminds me about them, as well as fixing a minor tech issue.
craigfowler
added a commit
that referenced
this issue
Feb 12, 2023
craigfowler
added a commit
that referenced
this issue
Feb 12, 2023
craigfowler
added a commit
that referenced
this issue
Feb 12, 2023
Merged
craigfowler
added a commit
that referenced
this issue
Feb 12, 2023
This removes some of the class hierarchy related to the manifest model, and replaces it with something simpler.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Generally-speaking the object model exposed by the validation manifest makes it quite difficult to create an invalid validator, but it is still possible.
In this case, if a developer tries to use that manifest to perform validation then they should be presented with a
ValidationException
. The message to that exception should make it clear what about their manifest is invalid.Implementation plan
I'd like to implement this via validation! I can use built-in validation rules to validate the validation manifest before it is used. If it is invalid, throw an exception with a message that includes the results.
What is an invalid manifest?
I need to perform some investigation to determine exactly what makes a manifest invalid. One thought about this is duplicate validation rules. That is two or more rules upon the same validated object which have identical rule-types and names.
Duplicate rules (multiple validation rules which validate the same validated value, of the same rule type and name) are not permitted. Currently this scenario is not detected and so the validator will attempt to perform the validation regardless.
There are almost certainly further invalid scenarios though.
The text was updated successfully, but these errors were encountered: