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;
			}
		}
예제 #2
0
        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());
        }
예제 #3
0
 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;
     }
 }