Validator erweitert

This commit is contained in:
2025-11-26 15:37:51 +01:00
parent 5226a4e9ce
commit 5f6df6bce9

View File

@@ -202,6 +202,9 @@ namespace BS.Shared.Core
}
public static bool IsInvoiceNumberValid(string invoiceNumber)
{
if (string.IsNullOrEmpty(invoiceNumber))
return false;
var pattern = @"^(?!.*[-/]{2})(?![-/])(?!.*[-/]$)[A-Za-z0-9]+(?:[/-][A-Za-z0-9]+)*$";
return Regex.IsMatch(invoiceNumber, pattern);