EcoRail validation
Here is yesterday's update. I wanted a way to validate the user input. Seeing as there are constraints in the model to me this was the obvious approach to take. The HTML in my main layout (MasterPage) was changed like so <body> #if ($Errors && $Errors.Count > 0) <ul class="errors"> #foreach ($currentError in $Errors) <li>$currentError</li> #end </ul> #end $childContent </body> This outputs all errors passed in PropertyBag["Errors"] or in my case I used Flash["Errors"]. To validate my product input I changed my controller like so: [AllowEcoSpaceDeactivateDirty(true)] public void Modify([EcoDataBind("Product", Allow = "ID,Name", NoObjectIdAction = ObjectIdAction.CreateNewInstance)]Product product) { PropertyBag["Product"] = product; IList<string> errors = GetErrorsForAllDirtyObjects(); if (errors.Count > 0) Flash["Erro