Gets more validation bits wired up. Server side validation is now working which is based on val-server-field since we can use this natively with the asp.net ModelState result instead of the val-server which is actually to be used with PropertyType (Property Editors). Next up is validation for the different tabs of the editor.

This commit is contained in:
Shannon
2015-10-08 17:13:38 +02:00
parent 97c352030a
commit c477f7a840
18 changed files with 149 additions and 36 deletions

View File

@@ -64,7 +64,7 @@ namespace Umbraco.Web
if (!result.MemberNames.Any())
{
//add a model state error for the entire property
modelState.AddModelError(string.Format("{0}.{1}", "Properties", propertyAlias), result.ErrorMessage);
modelState.AddModelError(string.Format("{0}.{1}", "_Properties", propertyAlias), result.ErrorMessage);
}
else
{
@@ -72,7 +72,7 @@ namespace Umbraco.Web
// so that we can try to match it up to a real sub field of this editor
foreach (var field in result.MemberNames)
{
modelState.AddModelError(string.Format("{0}.{1}.{2}", "Properties", propertyAlias, field), result.ErrorMessage);
modelState.AddModelError(string.Format("{0}.{1}.{2}", "_Properties", propertyAlias, field), result.ErrorMessage);
}
}
}