I would like to add a regular expression to a nattribute from a static class.
[RegularExpression(MyRegex.DecimalRegEx)]
from a class:
public static class MyRegex
{
public static string Decimal_Between_1_And_100
{
get
{
return (@"^\s*\d+(\.\d{1,2})?\s*$");
}
}
}
I know the attribute needs a const val - is there no way round this?
thanks
Davy