>>Hi everybody,
>>
>>In my EF model I have this field
>>
>> //[Required]
>> [DisplayName("Client No")]
>> [Column("client_no", TypeName = "smallint")]
>> public virtual Int16 Number { get; set; }
>>
>>Today when I was testing I typed some big number and then got the model IsValid = false with rather cryptic error message.
>>
>>So, I am thinking I need to limit the number I can type and my only question is what is the best way to handle such problem - add a range attribute?
>>
>>Thanks in advance.
>
>Yes, just add a range attribute.
Yes, that worked great (I did that already).
If it's not broken, fix it until it is.
My Blog