I have written a custom credit card validation attribute that checks CardNumber property is valid for a particular card type (another property in the same class)
[CardValidationBinCheck(this.CardType,
ErrorMessage = "CreditCardNumberDoesNotMatchCardType")]
public string CardNumber
{
...
}
This won't compile as studio complains that attribute arguments must be constant, a typeof expression or an array creation expression of an attribute parameter type (?).
Is there anyway I can pass cirvumvent this and pass my this.CardType
to the attribute?
Kindness,
Dan