Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to limit the input?
Message
General information
Forum:
ASP.NET
Category:
MVC
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01570971
Message ID:
01571262
Views:
28
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform