diff --git a/src/Pure.Blazor.Components/Forms/Validators/RegexValidator.cs b/src/Pure.Blazor.Components/Forms/Validators/RegexValidator.cs index f2bb869..86b91d7 100644 --- a/src/Pure.Blazor.Components/Forms/Validators/RegexValidator.cs +++ b/src/Pure.Blazor.Components/Forms/Validators/RegexValidator.cs @@ -19,7 +19,7 @@ public override ValidationResult ExecuteValidate(string? input) } var match = _rx.Match(input); - - return new ValidationResult(match.Success, match.Success == false ? $"{input} does not match the regular expression" : null); + var success = match.Success && match.Value.Length == input.Length; + return new ValidationResult(success, success == false ? $"{input} does not match the regular expression" : null); } -} \ No newline at end of file +}