Files
mixtape/zero/Validation/Validators/HexValidator.cs
T
2023-10-13 13:43:40 +02:00

12 lines
290 B
C#

using System.Text.RegularExpressions;
namespace zero.Validation.Validators;
public class HexValidator<T> : RegexValidator<T>
{
public override string Name => "HexValidator";
static Regex Regex = CreateRegex("(^$)|(#[0-9a-fA-F]{3,8})");
public HexValidator() : base(Regex) { }
}