I am trying to perform basic compare validation for two fields - password and confirmpassword.
For the error message, I am calling reference to fetch value for errormsg. If I use, I get the following error
An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type
[Compare(Constants.NewPassword, ErrorMessage = businessprovider.GetValueByKey(Constants.ErrorMsg))]