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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user