Hishop.Components.Validation/Validators/RegexValidator.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace Hishop.Components.Validation.Validators
{
using Hishop.Components.Validation;
using Hishop.Components.Validation.Properties;
using System;
using System.Globalization;
using System.Text.RegularExpressions;
public class RegexValidator : ValueValidator<string>
{
private RegexOptions options;
private string pattern;
private string patternResourceName;
private Type patternResourceType;
public RegexValidator(string pattern) : this(pattern, RegexOptions.None)
{
}
public RegexValidator(string pattern, bool negated) : this(pattern, RegexOptions.None, negated)
{
}
public RegexValidator(string pattern, string messageTemplate) : this(pattern, RegexOptions.None, messageTemplate)
{
}
public RegexValidator(string pattern, RegexOptions options) : this(pattern, options, (string) null)
{
}
public RegexValidator(string patternResourceName, Type patternResourceType) : this(patternResourceName, patternResourceType, RegexOptions.None)
{
}
public RegexValidator(string pattern, string messageTemplate, bool negated) : this(pattern, RegexOptions.None, messageTemplate, negated)
{
}
public RegexValidator(string pattern, RegexOptions options, bool negated) : this(pattern, options, null, negated)
{
}
public RegexValidator(string pattern, RegexOptions options, string messageTemplate) : this(pattern, options, messageTemplate, false)
{
}
public RegexValidator(string patternResourceName, Type patternResourceType, bool negated) : this(patternResourceName, patternResourceType, RegexOptions.None, negated)
{
}
public RegexValidator(string patternResourceName, Type patternResourceType, string messageTemplate) : this(patternResourceName, patternResourceType, RegexOptions.None, messageTemplate)
{
}
public RegexValidator(string patternResourceName, Type patternResourceType, RegexOptions options) : this(patternResourceName, patternResourceType, options, (string) null)
{
}
public RegexValidator(string pattern, RegexOptions options, string messageTemplate, bool negated) : this(pattern, null, null, options, messageTemplate, negated)
后面还有 75 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
