data-annotations
MVC Model require true
Is there a way through data annotations to require that a boolean pr开发者_Go百科operty be set to true?[详细]
2023-04-12 14:48 分类:问答DataAnnotations: Recursively validating an entire object graph
I have an object graph sprinkled with DataAnnotation attributes, where some properties of objects are classes which themselves have validation attributes, and so on.[详细]
2023-04-11 12:36 分类:问答MVC3 localization for default validation errors
When I put [Required] attribute on my ViewModel\'s property MVC3 automatically generate error messages like:[详细]
2023-04-11 08:00 分类:问答Validation fails for [DataType(DataType.Email)] in MVC3
It seems that the internal validation in the DataType DataAnnotation for DataType.Email fails when the email address starts with a number.I ran into this when a user with a 1234Something@gmail.com sty[详细]
2023-04-11 05:40 分类:问答ASP.NET MVC 3 Binding & Validating Date to html textbox control
I have a SmallDateTime field in my Sql Server 2008 database to store users Birthdays. On my \'Edit Profile\' web page, I have a standard textbox which I want to bind the \'Birthday\' date to (excludi[详细]
2023-04-10 21:20 分类:问答asp.net mvc 2 project does not render data annotation attributes
what can a problem that data annotation attributes are not rendered? w开发者_JAVA技巧eb.config <appSettings>[详细]
2023-04-09 11:07 分类:问答RegularExpression - Positive Integer with 1 Decimal Point
I can\'t seem to get the syntax correct for a 开发者_JS百科RegularExpression using C# to only allow positive numbers with up to 1 decimal point.[详细]
2023-04-07 14:28 分类:问答localizing mvc 3.0 validation client messages
At first sorry for Microsoft MVC team because of no simple solution for localizing data annotation validation messages. It takes me a lot of time and finally no simple solution found![详细]
2023-04-05 22:25 分类:问答Using Data Annotations to make a field required while searching for another in a form mvc 3
开发者_如何学GoI have a form with multiple search filters. Let\'s say Order Id, PO Num, Store Code, Status, etc. I would like to make Store Code required while user searches using PO Num. Is it possib[详细]
2023-04-04 18:07 分类:问答Is it possible to use C# DataAnnotations with IOC containers?
Is it possible to use C# DataAnnotations with IOC containers?I\'ve got a ValidationAttribute that I\'d like to inject a resolved object into the attribute class after the class is instantiated.Basicly[详细]
2023-04-03 23:36 分类:问答