2
I have a class with values decimal which may receive a value of -10.00 to 10.00 (including 0), in Sql Server the equivalent value is a Numeric(5,2). The problem is that by creating my class Metadata, even if specifying the crease validation has not been working.
Note: In my View It’s all right, I’m using the Validationmessagefor.
My code (Excerpt):
[Required(ErrorMessageResourceName = "VALIDACAO_REQUERIDO", ErrorMessageResourceType = typeof(Resources))]
[Range(-10.00, 10.00, ErrorMessage = "{0} deve estar entre {1} e {2}")]
public decimal Valor;
No code and no more details of the problem becomes difficult to help.
– Maniero
I just made a @bigown issue, sorry...
– Jedaias Rodrigues
@Jedaiasrodrigues Please post the excerpt from your View, the
packages.config
and theweb.config
. I made a project with default installation and worked first using your code.– Leonel Sanches da Silva