You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
319 B
15 lines
319 B
using System; |
|
|
|
namespace NaughtyAttributes |
|
{ |
|
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)] |
|
public class RequiredAttribute : ValidatorAttribute |
|
{ |
|
public string Message { get; private set; } |
|
|
|
public RequiredAttribute(string message = null) |
|
{ |
|
Message = message; |
|
} |
|
} |
|
}
|
|
|