Feature/validation extension - #116
Open
khalsz wants to merge 5 commits into
Open
Conversation
khalsz
requested review from
SimonPinches,
Yannicked,
maarten-ic,
olivhoenen and
prasad-sawantdesai
as code owners
August 6, 2026 13:05
khalsz
force-pushed
the
feature/validation-extension
branch
from
August 7, 2026 09:08
0f05aa1 to
48a18e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces support for loading an extended custom validator class from the server configuration. This allows users to extend SimDB's validation framework while remaining compatible with upstream releases, without needing to modify SimDB directly.
With this feature, users can install their own validation package into the application's virtual environment and specify the validator class to use in the server configuration.
Example configuration:
validation: custom_validator: myvalidator.validators.MyValidatorHow it works
At startup, SimDB will:
Read the configured validator class path.
Dynamically import the specified module.
Load the configured validator class.
Verify that it inherits from CustomValidator.
Use the configured validator class throughout the validation pipeline instead of the default CustomValidator.
If no custom validator is configured, SimDB continues to use the built-in CustomValidator, preserving the existing behaviour.
Benefits
Enables project-specific validation rules without modifying SimDB.
Makes the validation framework extensible while remaining compatible with upstream releases.
Maintains backward compatibility when no custom validator is configured.
Provides a clean extension point for custom validation implementations.
Example use case
A project can create its own package containing a validator implementation:
from simdb.validation.validator import CustomValidator class MyValidator(CustomValidator):...
After installing the package into the same virtual environment as SimDB, the project only needs to configure:
[validation]: custom_validator: myvalidator.validators.MyValidatorNo changes to the SimDB source code are required.