Custom ModelBindingMessageProvider implementation
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
A new way to provide a custom implementation of [ModelBindingMessageProvider]
For example If I have a form that have two properties the first one is of type **Int32** and the second on is of type **DataTime**
The validation error message of these types like that { The value ' ' is invalid } and to custom this error message you have one way to do that:
` services.Configure(options =>
{
options.ModelBindingMessageProvider.SetValueMustNotBeNullAccessor(value => "My Custom error message here...");
});`
But this custom error message will applying for all properties of type (Int32/DateTime) and so on.
And the the related issue is how to localize the custom message

Contributor guide
Assessment
This issue has not been assessed yet.