model中字段格式验证

注释部分在前端不显示
/// <summary>
		/// 链接地址
        /// </summary>
		[Display(Name = "链接地址")]
        //[DataType(DataType.Url,ErrorMessage ="请输入正确的链接")]
        [Url(ErrorMessage = "请输入正确的链接")]
		public string Url { get; set; }	

posted on 2016-07-25 18:50  tongdengquan  阅读(162)  评论(0编辑  收藏  举报