1
0
mirror of https://github.com/maxartz15/Validator.git synced 2024-11-14 00:25:34 +01:00
Validator/Runtime/Validators/Attributes/RequiredAttribute.cs
2022-07-21 02:03:11 +02:00

19 lines
533 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;
}
}
}