我的用户模式如下,在《欧洲法典》第1 mvc3中,其使用模式如下。
[NotMapped]
[Required(ErrorMessage = "Please enter password.")]
[Display(Name = "Password")]
public string LoginPassword { get; set; }
我与这部法典有以下几个问题。
- It is NotMapped, but still giving Modelstate.isvalid false with message Please enter password. How to resolve it?
- I have javascript on this password field to show indicator (weak, medium, strong). As its Required, when I click submit button without entering any value, its not giving me error as "Please enter password". How to display error message on client side?