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:
01571255
Views:
38
This message has been marked as a message which has helped to the initial question of the thread.
>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.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform