Quantcast
Channel: Fluent Validation for .NET
Viewing all articles
Browse latest Browse all 1917

New Post: Problem creating custom Date Validator

$
0
0
Hi

I'm guessing you're using asp.net mvc?

The message you're seeing isn't actually coming from FluentValidation, but is coming from MVC's model binding process, so trying to change FluentValidation to avoid this error won't actually work.

FluentValidation is only invoked after the property values have been set on your model, but this error comes from MVC during the setting of the property, so FluentValidation hasn't actually been executed yet, and isn't something FluentValidation has any control over.

As far as I'm aware, this message isn't something that can be changed...perhaps you could try adding a client-side mask on theninput to enforce a valid date before the form is submitted?

Jeremy

Viewing all articles
Browse latest Browse all 1917

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>