摘要:
在System.ComponentModel.DataAnnotations命名空间中,已经有了一些基本的属性类来实现验证功能,只要把这些属性加到Model的字段上就可以了。namespace HRApp.Web{ using System.ComponentModel.DataAnnotations; using HRApp.Web.Resources; public sealed partial class RegistrationData { [Key] [Required(ErrorMessageResourceName = "Val... 阅读全文