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

New Post: validate value type short

$
0
0
This isn't actually anything to do with FluentValidation, but rather with MVC.

If you are trying to map a text box to a numeric property, but the value you enter is not numeric then MVC will generate this error. This happens before validation occurs, so FluentValidation has not actually been invoked yet - this message comes from MVC's internals.

I am not personally aware of any way to change this message. One thing you might want to consider is using something like a jquery numeric plugin to force only numeric inputs in your textbox (eg http://www.texotela.co.uk/code/jquery/numeric/)

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>