Skip to content

Validate an entity before it is saved - #38

Merged
byjg merged 2 commits into
masterfrom
7.0
Oct 26, 2026
Merged

byjg merged 2 commits into
masterfrom
7.0

Conversation

@byjg

@byjg byjg commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Adds EntityValidatorInterface: a validator declared in TableAttribute / TableUuidPKAttribute (or set with Repository::setValidator()) receives the instance on every save(), before any field is mapped or converted, and rejects it by throwing. Works in the Repository and ActiveRecord patterns; documented in controlling-the-data, active-record and updating-the-database.

@byjg
byjg merged commit dfd24ae into master Oct 26, 2026
6 checks passed
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