Add new attributes

This commit is contained in:
honzapatCZ 2025-10-07 10:59:57 +02:00
parent b692336c07
commit ad3c449b1b
2 changed files with 26 additions and 0 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 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."){
}
}

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 StandardTextAttribute : RegexAttribute{
public StandardTextAttribute() : base("^[a-zA-Z0-9_-]*$","Aa_bb-123"){
}
}