2014年1月14日
摘要: 常用验证特性:using System.ComponentModel.DataAnnotations;using System.ComponentModel.DataAnnotations.Schema;View Code [Required] 必填[StringLength(20)] 字符长度限制20[StringLength(255,MinimumLength=6)] 字符最长255,最短6[RegularExpression(@"^[1-9]\d*$",ErrorMessage="请输入正整数")] 正则表达式[Range(0,1000)] 限定数 阅读全文
posted @ 2014-01-14 16:46 顺风车 阅读(813) 评论(0) 推荐(0)