Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to limit the input?
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
MVC
Titre:
Best way to limit the input?
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01570971
Message ID:
01570971
Vues:
49
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.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform