Better exception message on media type save

This commit is contained in:
Poornima Nayar
2019-08-29 17:22:23 +01:00
committed by Sebastiaan Janssen
parent 79f8dc200a
commit d2efcc822d

View File

@@ -390,6 +390,11 @@ namespace Umbraco.Core.Services.Implement
if (string.IsNullOrWhiteSpace(item.Name))
throw new ArgumentException("Cannot save item with empty name.");
if (item.Name != null && item.Name.Length > 255)
{
throw new InvalidOperationException("Name cannot be more than 255 characters in length.");
}
scope.WriteLock(WriteLockIds);
// validate the DAG transform, within the lock