UIStandardWebApi/UIStandardWebApi.EntityDto/ValidateRules/RequiredAttribute.cs

19 lines
478 B
C#
Raw Permalink Normal View History

2025-04-09 00:49:57 +00:00
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);
}
}
}