aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models/Validation/UsernameValidator.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-10-21 20:47:31 +0800
committer杨宇千 <crupest@outlook.com>2019-10-21 20:47:31 +0800
commitec7dfb73ace61a1aba5156cc1048cbe32ee1cee6 (patch)
treee6a9d4204e4fcd047cfcf5acd4ff566cf8bb69ff /Timeline/Models/Validation/UsernameValidator.cs
parent0384a07729fc340852e4e862f431acd66771d48e (diff)
downloadtimeline-ec7dfb73ace61a1aba5156cc1048cbe32ee1cee6.tar.gz
timeline-ec7dfb73ace61a1aba5156cc1048cbe32ee1cee6.tar.bz2
timeline-ec7dfb73ace61a1aba5156cc1048cbe32ee1cee6.zip
...
Diffstat (limited to 'Timeline/Models/Validation/UsernameValidator.cs')
-rw-r--r--Timeline/Models/Validation/UsernameValidator.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Timeline/Models/Validation/UsernameValidator.cs b/Timeline/Models/Validation/UsernameValidator.cs
index e4891400..ecc3b5b3 100644
--- a/Timeline/Models/Validation/UsernameValidator.cs
+++ b/Timeline/Models/Validation/UsernameValidator.cs
@@ -1,4 +1,5 @@
-using System.Linq;
+using Microsoft.Extensions.Localization;
+using System.Linq;
using System.Text.RegularExpressions;
namespace Timeline.Models.Validation
@@ -10,7 +11,7 @@ namespace Timeline.Models.Validation
private readonly Regex _regex = new Regex(RegexPattern);
- protected override bool DoValidate(string value, out string message)
+ protected override bool DoValidate(string value, IStringLocalizerFactory localizerFactory, out string message)
{
if (value.Length == 0)
{