mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Added MustMatchRegex to the DataRules.
This commit is contained in:
@@ -83,6 +83,10 @@ namespace RuriLib.Models
|
||||
case RuleType.MustNotContain:
|
||||
valid = !CheckContains(slice, rule.RuleString);
|
||||
break;
|
||||
|
||||
case RuleType.MustMatchRegex:
|
||||
valid = Regex.Match(slice, rule.RuleString).Success;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!valid) return false;
|
||||
|
||||
@@ -23,7 +23,10 @@ namespace RuriLib.Models
|
||||
MinLength,
|
||||
|
||||
/// <summary>The slice's length must be smaller or equal to a given number.</summary>
|
||||
MaxLength
|
||||
MaxLength,
|
||||
|
||||
/// <summary>The slice must match a given regex pattern.</summary>
|
||||
MustMatchRegex
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user