moving from Yavsc main lib
This commit is contained in:
parent
485b03c3c3
commit
40b625dc74
26 changed files with 1143 additions and 37 deletions
16
Yavsc.Server/Attributes/Validation/YaRegularExpression.cs
Normal file
16
Yavsc.Server/Attributes/Validation/YaRegularExpression.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
using System.Resources;
|
||||
|
||||
namespace Yavsc.Attributes.Validation
|
||||
{
|
||||
public class YaRegularExpression : System.ComponentModel.DataAnnotations.RegularExpressionAttribute {
|
||||
public YaRegularExpression(string pattern): base (pattern)
|
||||
{
|
||||
this.ErrorMessage = pattern;
|
||||
}
|
||||
|
||||
public override string FormatErrorMessage(string name)
|
||||
{
|
||||
return ResourcesHelpers.GlobalLocalizer[this.ErrorMessageResourceName];
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue