Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Pass NancyContext to DataAnnotationValidation Adapters #1739

Merged
merged 1 commit into from
Nov 5, 2014

Conversation

jayharris
Copy link
Contributor

The Data Annotation Validator Adapters have no way of accessing the NancyContext. DataAnnotationsValidator has access to the context, but drops it on the floor rather than passing it on to IPropertyValidator (and ultimately onto the Adapters).

This PR extends the Validate method on IPropertyValidator and subsequent adapters to also accept NancyContext, passing the context down from the core objects and making it accessible for custom validation implementations.

Because of the changes to the base Data Annotation Validation interfaces, this is a breaking change.
Locally, all tests pass.

@khellang khellang added this to the 1.0 Alpha milestone Nov 5, 2014
khellang added a commit that referenced this pull request Nov 5, 2014
Pass NancyContext to DataAnnotationValidation Adapters
@khellang khellang merged commit b4d6536 into NancyFx:master Nov 5, 2014
@khellang
Copy link
Member

khellang commented Nov 5, 2014

Doing some coding while at the summit? Love it! ❤️

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants