MvcValidatorToolkit/Validators/ValidateEqualTo.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) == false || !Values.ContainsKey(ReferenceElement) || (Values[element] ?? string.Empty) != (Values[ReferenceElement] ?? string.Empty))
				InsertError(element, ValidationSet.GetLocalizedText(ReferenceElement));
		}
protected override void Validate ( string element ) { if ( Values . ContainsKey ( element ) == false || ! Values . ContainsKey ( ReferenceElement ) || ( Values [ element ] ?? string . Empty ) != ( Values [ ReferenceElement ] ?? string . Empty ) ) InsertError ( element , ValidationSet . GetLocalizedText ( ReferenceElement ) ) ; }
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