1
0
mirror of https://github.com/maxartz15/Validator.git synced 2024-11-09 22:52:53 +01:00
Validator/Runtime/Validators/Attributes/RequiredAttribute.cs
2021-12-29 23:46:52 +01:00

19 lines
548 B
C#

using System;
namespace Validator
{
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class RequiredAttribute : Attribute
{
public WarningType WarningType { get; private set; } = WarningType.Error;
public string Category { get; private set; } = ReportCategories.Design;
public RequiredAttribute() { }
public RequiredAttribute(WarningType warningType = WarningType.Error, string category = ReportCategories.Design)
{
WarningType = warningType;
Category = category;
}
}
}