Revert files that shouldn't change back in v11
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata;
|
||||
using Umbraco.Extensions;
|
||||
|
||||
namespace Umbraco.Cms.Web.Common.Validators;
|
||||
|
||||
/// <summary>
|
||||
/// Ensures we bypass object graph validation for rendering models.
|
||||
/// </summary>
|
||||
internal class BypassRenderingModelValidationMetadataProvider : IValidationMetadataProvider
|
||||
{
|
||||
public void CreateValidationMetadata(ValidationMetadataProviderContext context)
|
||||
{
|
||||
if (context.Key.ModelType.IsRenderingModel())
|
||||
{
|
||||
context.ValidationMetadata.ValidateChildren = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user