Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Edited Feature: Client-side validation of [MaxLength] [1476]

$
0
0
Client-side validation is enabled for the StringLengthAttribute. Could it also be enabled for [MaxLengthAttribute](http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.maxlengthattribute.aspx)?

Repro Steps:
1. Create the following model class
public class Entity
{
public int Id { get; set; }

[StringLength(3)]
public string StringLength3 { get; set; }

[MaxLength(3)]
public string MaxLength3 { get; set; }
}
2. Scaffold a controller with views
3. Run the app and try to create a new entity

Expected result:
* Both StringLength3 and MaxLength3 fields are validated on the client.

Actual result:
* Only the StringLength3 field is validated on the client.
![Image](https://www.codeplex.com/Download/AttachmentDownload.ashx?ProjectName=aspnetwebstack&WorkItemId=1476&FileAttachmentId=764546)

Viewing all articles
Browse latest Browse all 7215

Trending Articles