Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to limit the input?
Message
Information générale
Forum:
ASP.NET
Catégorie:
MVC
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01570971
Message ID:
01571262
Vues:
27
>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform