I have a class called say
Class1
public string store { get; set; }
What I want is to decorate it with something like this;
Class1
[GetStoreNumberFromName]
[IsNumeric]
public string store {get; set; }
So the value might be 1234, or it might be 1234 - Store name
What I need to do is check to see if the value passed has only numbers in it. If it doesn't then I need, in the second example, to grab the first 4 chrs and change the value of the property to that.
So if the passed in value was 1234 - Store Name then at the end of [GetStoreNumberFromName] the value of store should be 1234 so that [IsNumeric] will pass as valid.