Add a validator to this AutoCompleteTextView. The validator will be added in the
queue of the current validators.

@param theValidator
@throws IllegalArgumentException if the validator is null
487924
public void addValidator(com.andreabaccega.formedittextvalidator.Validator theValidator) throws IllegalArgumentException {
        editTextValidator.addValidator(theValidator);
    }
580017
public void addValidator(final FieldValidator validator) {
		WComponent labelField = findComponentForLabel(field);

		if (labelField instanceof Input) {
			((Input) labelField).addValidator(validator);
		}
	}
317003
public <T> FluentValidator on(T t, Validator<T> v) {
        Preconditions.checkNotNull(v, "Validator should not be NULL");
        composeIfPossible(v, t);
        doAdd(new ValidatorElement(t, v));
        lastAddCount = 1;
        return this;
    }
676640
public ApiPreprocessingContext validateWith(IValidator... apiValidators) {
		for (IValidator apiValidator : apiValidators) {
			if (apiValidator == null) {
				throw new IllegalArgumentException("Validator cannot be null");
			}
			this.validators.add(apiValidator);
		}
		return this;
	}
903726
@SuppressWarnings({ "rawtypes", "unchecked" })
  void complete() {

    if (this.range != null) {
      AbstractValidatorRange validator = null;
      if (this.valueType != null) {
        Class<?> valueClass = this.valueType.getAssignmentClass();
        if (this.valueType.isCollection()) {
          validator = new ValidatorCollectionSize(this.range);
        } else if (this.valueType.isMap()) {
          validator = new ValidatorMapSize(this.range);
        } else if (this.valueType.getComponentType() != null) {
          validator = new ValidatorArrayLength(this.range);
        } else if (this.mathUtil.getNumberType(valueClass) != null) {
          validator = new ValidatorRange<>(this.range);
        }
      }
      if (validator == null) {
        validator = new ValidatorRangeGeneric<>(this.range);
      }
      this.validatorRegistry.add(validator);
    }
  }
730782
protected<T, C extends Collection<T>> ParamListValidator<T, C> getListValidator(ParamValidator<T> validator) {

        if (validator == null) {
            return null;
        }

        return new ParamListValidator<T, C>(validator);
    }
394617
private boolean isRequiredViaNestedRequiredValidator() {
        boolean result = false;
        if (null == validators) {
            return result;
        }
        Iterator<Validator> iter = validators.iterator();
        while (iter.hasNext()) {
            if (iter.next() instanceof RequiredValidator) {
                // See JAVASERVERFACES-2526.  Note that we can assume
                // that at this point the validator is not disabled, 
                // so the mere existence of the validator implies it is
                // enabled.
                result = true;
                Object submittedValue = getSubmittedValue();
                if (submittedValue == null) {
                    // JAVASERVERFACES-3058 asserts that view parameters 
                    // should be treated differently than form parameters
                    // if they are not submitted.  I'm not sure if that's 
                    // correct, but let's put this in and see how 
                    // the community responds.
                    this.setSubmittedValue("");
                }
                break;
            }
        }
                
        return result;
    }
960926
protected boolean validate(Validator validator, UIObject ui) {

        if (notifiedWidgets.containsKey(validator))
            ui = notifiedWidgets.get(validator);

        String msg = validator.validate();
        if (msg == null || msg.length() == 0) {
            validationStyles(validator, null, ui, true);
            return true;
        } else {
            validationStyles(validator, msg, ui, false);
            return false;
        }
    }
1032604
private Validator createNewErrorValidator() {
        final Validator validator = schema.newValidator();
        validator.setErrorHandler(new Handler());
        return validator;
    }
1055382
public function addValidator(callable $validator, string $validator_name): self
    {
        $this->validators[$validator_name] = $validator;

        return $this;
    }
949699
public static void validateWith(Validator provider) {

		validator = provider;
		if (validator != null) {
			log.info("Registered validation provider: " + validator.getClass().getName());
		}
	}
887810
public function addValidator(ValidatorInterface $validator)
    {
        if ($validator instanceof ObjectValidatorInterface) {
            $validator->setValidatedInstancesContainer = $this->validatedInstancesContainer;
        }
        $this->validators->attach($validator);
    }
1302979
public IValidator appendError(IValidator validator) {
		if (validator == null) return this;
		if (! (validator instanceof WebValidator) ) {
			throw new IllegalArgumentException("Must WebValidator.");
		}
		
		WebValidator valid = (WebValidator) validator;
		if (valid.isSuccess())
			return this;
		if (this.success) {
			this.msg = valid.msg;
			this.success = valid.success;
		} else {
			msg.append("<br>").append(valid.getMsg());
		}
		return this;
	}
1129237
public void addValidator(Validator validator, String errorKey) {
        if(!errors.containsKey(errorKey))
            errors.addValidator(errorKey, validator);
    }
997930
public static<T extends ParamValidator> T getValidator(Class<T> clazz, boolean required) {

        List<ParamValidator> validators = validatorsMap.get(clazz);
        if (validators != null) {

            if (required) {
                return (T)validators.get(0);
            }

            return (T)validators.get(1);
        }

        return null;
    }
341562
public synchronized boolean addInvalidationListener(InvalidationListener listener) {
        if (bEnableListener && listener != null) {
            eventSource.addListener(listener);
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "addInvalidationListener() cacheName=" + this.cacheName + " listener=" + eventSource.getInvalidationListenerCount());
            }
            return true;
        }
        return false;
    }
1181093
@Override
	public Validator newValidator(String identifier) {
		if (identifier==null) {
			return null;
		}
		ValidatorFactory template;
		synchronized (map) {
			verifyMapIntegrity();
			template = map.get(identifier);
		}
		if (template!=null) {
			try {
				return template.newValidator(identifier);
			} catch (ValidatorFactoryException e) {
				logger.log(Level.WARNING, "Failed to create validator.", e);
				return null;
			}
		} else {
			return null;
		}
	}