TRD: Better Validation Implementation #616
StephenRiosDev
started this conversation in
Technical Research Documents
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The current implementation of validation has all of the validation happening in a single file/class:
AuroValidator.Components import and implement this validator with
this.validator = new AuroValidator, but all handling for each component is compiled entirely into theAuroValidatorclass rather than handled by the individual components.This discussion is around how we can better implement validation, ideally abstracting the handling of how validation should happen out of
AuroValidatorand into each component, and updatingAuroValidatorto be a generic handler that runs tests for a simple pass/fail and updating the validity state of the passed host, and passing individual tests for pass/fail from the component to the validator.This approach allows us to maintain individual responsibility as well as build a more robust, easier to maintain and update, and less fragile validation system.
Beta Was this translation helpful? Give feedback.
All reactions