Hi I am using a model having
[Range(1, 4, ErrorMessageResourceName = "NameRequiredError", ErrorMessageResourceType =typeof(Resources.PatientNotes))]
public int ActionType { get; set; }
My Resource file contains key as NameRequiredError
and its value as "Name is required" but when I run I don't get any error and My Model State is valid but when I use
[Range(1, 4)]
public int ActionType { get; set; }
then it gives me proper error and ModelState.IsValid
as False
The problem is only when I use separate project for resource file; otherwise it works well.