MvcValidatorToolkit/Validators/ValidateCreditCardNumber.cs
/// <summary>
/// Validates the given element using the Values collection and generates an error if 
/// invalid.
/// </summary>
Validates the given element using the Values collection and generates an error if
invalid.
Validates the given element using the Values collection and generates an error if invalid .
protected override void Validate(string element)
		{
			if(!Values.ContainsKey(element) || string.IsNullOrEmpty(Values[element]) || (!ValidateRegexForCreditCardNumber((Values[element] ?? string.Empty).Trim())))
				InsertError(element);
		}
protected override void Validate ( string element ) { if ( ! Values . ContainsKey ( element ) || string . IsNullOrEmpty ( Values [ element ] ) || ( ! ValidateRegexForCreditCardNumber ( ( Values [ element ] ?? string . Empty ) . Trim ( ) ) ) ) InsertError ( element ) ; }
Validates the given element using the Values collection and generates an error if
invalid.
Validates the given element using the Values collection and generates an error if invalid .
element
string