cahnge the attribute to identifier and standard text

This commit is contained in:
honzapatCZ 2025-10-10 14:34:23 +02:00
parent ad3c449b1b
commit 5141562618
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
namespace NejCommon.Validation;
public class IdentifierTextAttribute : RegexAttribute{
public IdentifierTextAttribute() : base("^[a-zA-Z0-9_-]*$","Aa_bb-123"){
}
}

View File

@ -7,7 +7,7 @@ using System.Text.RegularExpressions;
namespace NejCommon.Validation; namespace NejCommon.Validation;
public class StandardTextAttribute : RegexAttribute{ public class StandardTextAttribute : RegexAttribute{
public StandardTextAttribute() : base("^[a-zA-Z0-9_-]*$","Aa_bb-123"){ public StandardTextAttribute() : base("^[a-zA-Z0-9_-., ]*$","Aa_bb-123"){
} }
} }