MVC 验证和异常处理 重用服务端验证
摘要:
还记得之前做的自定义email地址合法性验证吗?public class ValidEmailAddressAttribute : RegularExpressionAttribute { private const string EmailPattern = ".+@.+\\..+"; public ValidEmailAddressAttribute() : base(EmailPattern) { // Default message unless declared on the attribute ErrorMessage = "{0} must be a 阅读全文
posted @ 2011-03-05 23:27 arg 阅读(513) 评论(0) 推荐(0) 编辑