1
0
mirror of https://github.com/maxartz15/Validator.git synced 2025-06-26 11:36:01 +02:00

Required Attribute Validator

This commit is contained in:
max
2021-12-29 23:46:52 +01:00
parent 165afa3c53
commit 74fd067220
12 changed files with 145 additions and 7 deletions

View File

@ -0,0 +1,19 @@
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;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4dbbb107f0e849140b1132ac5dcca90f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: