mirror of
https://github.com/maxartz15/Validator.git
synced 2024-11-14 00:25:34 +01:00
19 lines
548 B
C#
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;
|
||
|
}
|
||
|
}
|
||
|
}
|