cahnge the attribute to identifier and standard text
This commit is contained in:
parent
ad3c449b1b
commit
5141562618
13
Validation/IdentifierTextAttribute.cs
Normal file
13
Validation/IdentifierTextAttribute.cs
Normal 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"){
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -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"){
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user