Skip to content

Add support for field validation#97

Open
DamianEdwards wants to merge 1 commit into
mainfrom
damianedwards/add-fields-validation
Open

Add support for field validation#97
DamianEdwards wants to merge 1 commit into
mainfrom
damianedwards/add-fields-validation

Conversation

@DamianEdwards
Copy link
Copy Markdown
Owner

Adds validation support for public instance fields so readonly structs and other field-backed models can use DataAnnotations the same way property-backed models do.

The implementation generalizes cached validation metadata from properties to members, preserving existing property behavior while adding field attribute discovery, field value access, recursive validation, display names, and [SkipRecursion] support. It also aggregates duplicate member-name errors so hidden field/property combinations do not throw while reporting validation failures.

This also bumps the package version to 0.11.0.

Fixes: #56

Tests: dotnet test MiniValidation.slnx --no-restore --nologo --verbosity minimal --tl:off

Support validating public fields alongside public properties, including recursive validation and readonly struct fields.

Bump package version to 0.11.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Add support for fields validation

1 participant