MvcValidatorToolkit/Validators/ValidatePresence.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[element] ?? string.Empty).Trim().Length == 0)
				InsertError(element);
		}
protected override void Validate ( string element ) { if ( Values . ContainsKey ( element ) == false || ( Values [ element ] ?? string . Empty ) . Trim ( ) . Length == 0 ) 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