public void SetHuman(IValidateHuman validateHuman) { if (validateHuman != null) { this.UseValidateHuman = true; this.ValidateHumanClass = validateHuman.GetType().AssemblyQualifiedName; if (!String.IsNullOrEmpty(validateHuman.AltValidationFailText)) { this.ValidationFailText = validateHuman.AltValidationFailText; } } else { this.UseValidateHuman = false; this.ValidateHumanClass = String.Empty; this.ValidationFailText = String.Empty; } }
public HtmlHelper <ContactInfo> GetModelHelper(string partialName, IValidateHuman validateHuman) { _model = InitContactInfo(partialName); _settings.UseValidateHuman = true; _settings.ValidateHumanClass = validateHuman.GetType().AssemblyQualifiedName; if (!String.IsNullOrEmpty(validateHuman.AltValidationFailText)) { _settings.ValidationFailText = validateHuman.AltValidationFailText; } return(InitHelp()); }