Validator erweitert
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user