Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET Core model-binding is broken #77

Closed
billbogaiv opened this issue Jul 20, 2020 · 1 comment
Closed

.NET Core model-binding is broken #77

billbogaiv opened this issue Jul 20, 2020 · 1 comment
Labels

Comments

@billbogaiv
Copy link
Member

billbogaiv commented Jul 20, 2020

Ref.

bindingContext.Result = ModelBindingResult.Success(rangeResult);

Currently, when a valid-result converting incoming string to IRange<T> happens, the binding context is set to the value of the RangeResult<T> and not its value—IRange<T>.

This leads to the ASP.NET Core framework reporting an error when taking RangeResult<T> and trying to make it IRange<T>.

{
    "message": "Validation Failed",
    "errors": [
        {
            "message": "The value provided was not valid",
            "messages": [
                "The value provided was not valid"
            ],
            "field": "..."
        }
    ]
}
@kendaleiv
Copy link
Contributor

Fixed via #78 in version 0.30.0.

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

No branches or pull requests

3 participants