You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DSWMS/开发版dev/Vue.NetCore/Vue.Net/VOL.Core/ObjectActionValidator/NullObjectModelValidator.cs

30 lines
732 B
C#

2 years ago
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using VOL.Core.Extensions;
using VOL.Core.Filters;
namespace VOL.Core.ObjectActionValidator
{
public class NullObjectModelValidator : IObjectModelValidator
{
public void Validate(
ActionContext actionContext,
ValidationStateDictionary validationState,
string prefix,
object model)
{
if (string.IsNullOrEmpty(prefix))
{
actionContext.ModelValidator(prefix, model);
return;
}
}
}
}