get the validators
180805
protected Map<ByteBuffer, AbstractType> getValidatorMap(CfDef cfDef) throws IOException
    {
        Map<ByteBuffer, AbstractType> validators = new HashMap<ByteBuffer, AbstractType>();
        for (ColumnDef cd : cfDef.getColumn_metadata())
        {
            if (cd.getValidation_class() != null && !cd.getValidation_class().isEmpty())
            {
                AbstractType validator = null;
                try
                {
                    validator = TypeParser.parse(cd.getValidation_class());
                    if (validator instanceof CounterColumnType)
                        validator = LongType.instance; 
                    validators.put(cd.name, validator);
                }
                catch (ConfigurationException e)
                {
                    throw new IOException(e);
                }
                catch (SyntaxException e)
                {
                    throw new IOException(e);
                }
            }
        }
        return validators;
    }
1001033
public function getValidator()
    {
        if (!$this->validator) {
            $this->validator = static::$validatorFactory->make(
                [],
                static::getCreateRules(),
                static::getValidationMessages(),
                static::getValidationAttributes()
            );
        }

        return $this->validator;
    }
814209
def get_validator_list(self):
        """"""
        ignore = [
            'dict',
        ]
        vlist = []
        if not self.override:
            return vlist

        for k, v in list(self.override['classes'].items()):
            if 'validator' in v:
                validator = v['validator']
                if validator not in ignore and validator not in vlist:
                    vlist.append(validator)

        for k, v in list(self.override['classes'].items()):
            for kp, vp in list(v.items()):
                if 'validator' in vp:
                    validator = vp['validator']
                    if validator not in ignore and validator not in vlist:
                        vlist.append(validator)
        return sorted(vlist)
224962
def get(self):
        

        pool = current_app.config['bigchain_pool']

        with pool() as bigchain:
            validators = bigchain.get_validators()

        return validators
13126
private CmsInternalLinksValidator getValidator() {

        if (m_validator == null) {
            // get the content check result object
            Map objects = (Map)getSettings().getDialogObject();
            Object o = objects.get(CmsInternalLinkValidationDialog.class.getName());
            List resources = new ArrayList();
            if ((o != null) && (o instanceof List)) {
                resources = (List)o;
            }
            m_validator = new CmsInternalLinksValidator(getCms(), resources);
        }
        return m_validator;
    }
607724
public function getValidators()
    {
        $allValidatorData = $this->validators->
                                            toArray(PriorityQueue::EXTR_DATA);
        foreach ($allValidatorData as $key => $validatorData) {
            $allValidatorData[$key] = $validatorData['instance'];
        }
        return $allValidatorData;
    }
698168
function validate () {
    var this$1 = this;
    var args = [], len = arguments.length;
    while ( len-- ) args[ len ] = arguments[ len ];

    var validators;
    var value;
    var cb;
    var ret = true;

    if (args.length === 3) {
      validators = [args[0]];
      value = args[1];
      cb = args[2];
    } else if (args.length === 2) {
      if (isPlainObject(args[0])) {
        validators = [args[0].validator];
        value = args[0].value || this.getValue();
        cb = args[1];
      } else {
        validators = this._keysCached(this._uid.toString(), this.results);
        value = args[0];
        cb = args[1];
      }
    } else if (args.length === 1) {
      validators = this._keysCached(this._uid.toString(), this.results);
      value = this.getValue();
      cb = args[0];
    } else {
      validators = this._keysCached(this._uid.toString(), this.results);
      value = this.getValue();
      cb = null;
    }

    if (args.length === 3 || (args.length === 2 && isPlainObject(args[0]))) {
      ret = this._validate(validators[0], value, cb);
    } else {
      validators.forEach(function (validator) {
        ret = this$1._validate(validator, value, cb);
      });
    }

    return ret
  }
167587
def any_validator(obj, validators, **kwargs):
    
    if not len(validators) > 1:
        raise ValueError(
            "any_validator requires at least 2 validator.  Only got "
            "{0}".format(len(validators))
        )
    errors = ErrorDict()
    for key, validator in validators.items():
        try:
            validator(obj, **kwargs)
        except ValidationError as err:
            errors[key] = err.detail
        else:
            break
    else:
        if len(errors) == 1:
            # Special case for a single error.  Just raise it as if it was the
            # only validator run.
            error = errors.values()[0]
            raise ValidationError(error)
        else:
            # Raise all of the errors with the key namespaces.
            errors.raise_()
898954
private Validator<ValueType> validateLeft() {
        Validator<ValueType> result = null;
        Collection<Validator<ValueType>> subValidators = onGetLeftErrorMessage();

        if (subValidators != null) {
            for (Validator<ValueType> validator : subValidators) {
                notifyOnValidationFailure(validator);

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

        for (Validator<ValueType> validator : validators) {
            if (!validator.validate(getValue())) {
                notifyOnValidationFailure(validator);

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

        return result;
    }
1356463
def validate
      errors = {}

      call_validators do |name, message|
        errors[name] ||= []
        errors[name] << to_error(message)
      end

      errors
    end
1025410
private static function _processValidators()
    {
        foreach ($_SESSION['__KWF']['VALID'] as $validator_name => $valid_data) {
            $validator = new $validator_name;
            if ($validator->validate() === false) {
                $_SESSION = array();
                Zend_Session::regenerateId();
                break;
            }
        }
    }
848714
public Validator[] getValidators()
    {
        return _validatorList == null ? EMPTY_VALIDATOR_ARRAY
                : _validatorList.toArray(new Validator[_validatorList.size()]);
    }
1252906
def get_validator(filter_data):
    
    for matcher_type, m in matchers.items():
        if hasattr(m, 'can_handle') and m.can_handle(filter_data):
            filter_data = m.handle(filter_data)

    return filter_data
52065
def validate(self, value=None, model=None, context=None):
        
        errors = []
        for validator in self.validators:
            if value is None and not isinstance(validator, Required):
                continue

            error = validator.run(
                value=value,
                model=model,
                context=context if self.use_context else None
            )
            if error:
                errors.append(error)

        return errors
1082995
public function getValidators()
    {
        $this->validators = $this->generateInputs();

        $translatedInputs = [];

        foreach ($this->validators as $key => $validator) {
            $translatedOperators = [];

            foreach ($validator['availableOperators'] as $availableOperators) {
                $translatedOperators[$availableOperators] = Operators::getI18n(
                    $this->translator,
                    $availableOperators
                );
            }

            $validator['availableOperators'] = $translatedOperators;

            $translatedInputs[$key] = $validator;
        }

        $validators = [
            'inputs'       => $translatedInputs,
            'setOperators' => $this->operators,
            'setValues'    => $this->values
        ];

        return $validators;
    }
940702
public function getValidators() {
		if ($this->_validators === false) {
			return;
		}
		
		if ($this->_validators === null) {
			$definition = $this->getValidationDefinition();
			
			if ($definition === null) {
				$this->_validators = false;
				return;
			}
			
			$validators = [];
			
			foreach ($definition as $propName => $propValidators) {
				$propValidators = (array) $propValidators;
				
				if (! isset($validators[$propName])) {
					$validators[$propName] = [];
				}
				
				foreach ($propValidators as $name => $validatorDefinition) {
					if ($validatorDefinition instanceof ValidatorInterface) {
						$validators[$propName][$name] = $validatorDefinition;
					}
					else if (is_string($validatorDefinition)) {
						$validator = $this->getValidatorsLocator()->get($validatorDefinition);
						
						if (! $validator instanceof ValidatorInterface) {
							throw new Exception('Validator must implements "ValidatorInterface" interface');
						}
						
						$validators[$propName][$name] = $validator;
					}
					else if (is_array($validatorDefinition)) {
						if (! isset($validatorDefinition[0]) || ! is_string($validatorDefinition[0])) {
							throw new Exception('Invalid validator definition for the "' . $propName . '" property');
						}
						
						$validatorName = $validatorDefinition[0];
						unset($validatorDefinition[0]);
						
						$validator = $this->getValidatorsLocator()->getByArguments($validatorName, [$validatorDefinition]);
						
						if (! $validator instanceof ValidatorInterface) {
							throw new Exception('Validator must implements "ValidatorInterface" interface');
						}
						
						$validators[$propName][$name] = $validator;
					}
					else {
						throw new Exception('Invalid validator definition for the "' . $propName . '" property');
					}
				}
			}
			
			$this->_validators = $validators;
		}
		
		return $this->_validators;
	}
1229653
def _call_validators(self):
        
        msg = []
        msg.extend(self._validate_keyfile())
        msg.extend(self._validate_dns_zone())
        msg.extend(self._validate_retries())
        msg.extend(self._validate_project())
        return msg