Better reghex
This commit is contained in:
parent
feb7ed4d6c
commit
7469a4d014
|
|
@ -7,7 +7,7 @@ using System.Text.RegularExpressions;
|
|||
namespace NejCommon.Validation;
|
||||
|
||||
public class IdentifierTextAttribute : RegexAttribute{
|
||||
public IdentifierTextAttribute() : base("^[a-zA-Z0-9._-]+$","Aa_bb-12.3"){
|
||||
public IdentifierTextAttribute() : base(@"\A[A-Za-z0-9][A-Za-z0-9._/-]*\z","Aa_bb-12.3"){
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ using System.Text.RegularExpressions;
|
|||
namespace NejCommon.Validation;
|
||||
|
||||
public class StandardDescriptionAttribute : RegexAttribute{
|
||||
public StandardDescriptionAttribute() : base(@"^[\p{L}\p{N}\p{P}\s]*$","Brown fox's - jumping over lazy dogs.", "Only normal characters are allowed, no emjos, etc."){
|
||||
public StandardDescriptionAttribute() : base(@"\A[\p{L}\p{M}\p{N}\p{P}\p{Zs}&+@€$%]+\z","Brown fox's - jumping over \"lazy\"(dogs).", "Only normal characters are allowed, no emjos, etc."){
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ using System.Text.RegularExpressions;
|
|||
namespace NejCommon.Validation;
|
||||
|
||||
public class StandardTextAttribute : RegexAttribute{
|
||||
public StandardTextAttribute() : base(@"^[\p{L}\p{N}\-_,. ]*$","Příliš žlouťoučký kůň úpěl 2 ďábelské ódy"){
|
||||
public StandardTextAttribute() : base(@"\A(?:[^\p{Cc}]|[\r\n\t])*\z","Příliš žlouťoučký kůň úpěl 2 ďábelské ódy"){
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user