Skip to content
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

Implement custom validators #54

Merged
merged 5 commits into from
Nov 19, 2023
Merged

Implement custom validators #54

merged 5 commits into from
Nov 19, 2023

Conversation

apexatoll
Copy link
Owner

  • This PR enables target applications to define their own validator classes that can be used in target models via the Kangaru::Validatable concern
  • This is implemented via the new Kangaru::Validators.get method, which queries both the Kangaru and target application namespaces for the validator class in respective Validators namespaces.

- This is to allow the definition of custom validators in the target
  namespace, and retain the ability to add native error objects.
- Without this, the target application would have to define a type -
  message lookup which would then need to be identified and merged by
  the Error class.
@apexatoll apexatoll merged commit f8cd9b4 into main Nov 19, 2023
3 checks passed
@apexatoll apexatoll deleted the custom-validators branch November 19, 2023 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant