I have Model
with properties
with Require
attribute
. I also have resource
file which I store some values. The idea is to use the resource file as values to attribute property parameter
. But the following error message is thrown Error 1 An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type Credentials.cs. Any idea what is the problem and how to solve it ?
Example:
[Required(ErrorMessage = STT.Properties.Resources.Require_Username)]
public string Username { get; set; }