Re-fabrication
This commit is contained in:
17
Yavsc.Server/Attributes/Validation/YaRegularExpression.cs
Normal file
17
Yavsc.Server/Attributes/Validation/YaRegularExpression.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System.Resources;
|
||||
using Yavsc.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.DefaultResourceManager.GetString(this.ErrorMessageResourceName);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user