diff --git a/Validation/IdentifierTextAttribute.cs b/Validation/IdentifierTextAttribute.cs new file mode 100644 index 0000000..9459d5e --- /dev/null +++ b/Validation/IdentifierTextAttribute.cs @@ -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"){ + + } +} \ No newline at end of file diff --git a/Validation/StandardTextAttribute.cs b/Validation/StandardTextAttribute.cs index 152de3e..239919a 100644 --- a/Validation/StandardTextAttribute.cs +++ b/Validation/StandardTextAttribute.cs @@ -7,7 +7,7 @@ using System.Text.RegularExpressions; namespace NejCommon.Validation; public class StandardTextAttribute : RegexAttribute{ - public StandardTextAttribute() : base("^[a-zA-Z0-9_-]*$","Aa_bb-123"){ + public StandardTextAttribute() : base("^[a-zA-Z0-9_-., ]*$","Aa_bb-123"){ } } \ No newline at end of file