2018-03-26 19:27:29 +02:00
|
|
|
|
2017-10-04 23:53:47 +02:00
|
|
|
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)
|
|
|
|
|
{
|
2018-03-26 23:18:48 +02:00
|
|
|
return ResourcesHelpers.GlobalLocalizer[this.ErrorMessageResourceName];
|
2017-10-04 23:53:47 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|