In my MVC 5 app when I want to return validation error for the form values I use this pattern in the Controller:
ModelState.AddModelError("PropertyName", "Validation Message");
Is there a recommended practice that does not use string literal in the Controller for property name?
I am using .Net 4.5 and I would rather not upgrade to .Net 4.6. I am using Visual Studio 2013 and would rather not upgrade to Visual Studio 2015.