UIStandardWebApi/UIStandardWebApi.EntityDto/ValidateRules/RequiredAttribute.cs
2025-04-09 08:49:57 +08:00

19 lines
478 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace UIStandardWebApi.EntityDto.ValidateRules
{
public class RequiredAttribute : BaseAbstractAttribute
{
public RequiredAttribute(string? messge) : base(messge) { }
public override (bool, string?) DoValidate(object oValue)
{
return oValue == null ? (false, Message) : (true, string.Empty);
}
}
}