Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add external validator support - #92

#92
Open
DamianEdwards wants to merge 2 commits into
mainDamianEdwards/MiniValidation:mainfrom
copilot/pr67-external-validators-redesignDamianEdwards/MiniValidation:copilot/pr67-external-validators-redesignCopy head branch name to clipboard
Open

Add external validator support#92
DamianEdwards wants to merge 2 commits into
mainDamianEdwards/MiniValidation:mainfrom
copilot/pr67-external-validators-redesignDamianEdwards/MiniValidation:copilot/pr67-external-validators-redesignCopy head branch name to clipboard

Conversation

@DamianEdwards

Copy link
Copy Markdown
Owner

Replaces #67 with a revised external-validator implementation targeted for the 0.11.0 milestone.

Summary

  • Adds IValidate<TTarget> and IAsyncValidate<TTarget> for external validators
  • Resolves validators from the IServiceProvider already accepted by MiniValidator
  • Supports single and IEnumerable<> validator registrations without adding a DI package dependency to the core library
  • Handles nested objects and enumerable elements with external validators
  • Caches delegates without capturing validator instances, preserving transient/scoped behavior
  • Adds documentation and unit coverage for the new API

Validation

  • dotnet test tests\MiniValidation.UnitTests\MiniValidation.UnitTests.csproj -f net8.0 --nologo --verbosity minimal
  • dotnet build src\MiniValidation\MiniValidation.csproj -f netstandard2.0 --nologo --verbosity minimal

Refs #67

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

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.