Build a list of supposed validators based on columns and indexes information.

@return array
420545
protected function scaffoldRules()
    {
        $rules = [];

        $eloquent = $this->model();
        $table = $eloquent->getTable();

        foreach (scheme()->columns($table) as $column) {
            $name = $column->getName();
            // skip Primary Key
            if ($name === $eloquent->getKeyName()) {
                continue;
            }

            // skip rankable field
            if ($eloquent instanceof Rankable && $name === $eloquent->getRankableColumn()) {
                continue;
            }

            if (!empty($columnRules = $this->proposeColumnRules($eloquent, $column))) {
                $rules[$name] = implode('|', $columnRules);
            }
        }

        return $rules;
    }
805118
protected function validateDuplicates()
	{
		return ( !$this->duplicatesExistForColumn( $this->model->getQualifiedLeftColumnName() ) && !$this->duplicatesExistForColumn( $this->model->getQualifiedRightColumnName() ) );
	}
1222545
public function validationRules():array
    {
        $rules = [];

        foreach ($this as $control) {
            $rule = $control->getRule();
            if (!empty($rule)) {
                $rules[$control->getName()] = $control->getRule();
            }
        }

        return $rules;
    }
942253
protected function getSelectedWithColumns()
    {
        $result = [];
        foreach ($this->withFields as $fieldSourceAlias => $withInfo) {
            list ($collection, $fields) = $withInfo;
            $resolvedFields = $this->resolveSelectiveFields($collection, $fields, []);
            $result = array_merge($result, $this->getSelectedColumns($resolvedFields, $fieldSourceAlias));
        }

        return $result;
    }
1365765
protected function getValidatorInstance()
    {
        $factory = $this->app()->make(Factory::class);

        if (method_exists($this, 'validator')) {
            $validator = $this->app()->call([$this, 'validator'], compact('factory'));
        } else {
            $validator = $this->createDefaultValidator($factory);
        }

        if (method_exists($this, 'withValidator')) {
            $this->withValidator($validator);
        }

        return $validator;
    }
404253
public function getColumns(): array
    {
        $tSelects = isset($this->statements['selects']) === true ? $this->statements['selects'] : [];
        $tColumns = [];
        foreach ($tSelects as $key => $value) {
            if (\is_string($value)) {
                if (\is_int($key)) {
                    $tElements = explode('.', $value);
                    if (!\in_array('*', $tElements, true)) {
                        $tColumns[$tElements[1] ?? $tElements[0]] = $value;
                    }
                } elseif (\is_string($key)) {
                    $tColumns[$value] = $key;
                }
            }
        }
        return $tColumns;
    }
1372645
def _validators(self):
		""""""
		
		for validator in self.__validators__.values():
			yield validator
		
		if self.validators:
			for validator in self.validators:
				yield validator
566320
public function getValidationMessage(): array{
        $fields = [];
        foreach ($this->validations as $validation) {
            /* @var Validation $validation */
            if ($validation->getStatus() == Validation::ERROR) {
                if (!isset($fields[$validation->getField()])) {
                    $fields[$validation->getField()] = [];
                }
                var_dump($validation->getMessage());
                array_push($fields[$validation->getField()], $validation->getMessage());
            }
        }
        return $fields;
    }
11917
public function getErrors(): array
    {
        if ($this->errors === null) {
            $this->errors = $this->fetchErrors();
        }

        //Making sure that each error point to proper input origin
        return $this->mapper->mapErrors($this, $this->validateNested($this->errors));
    }
848714
public Validator[] getValidators()
    {
        return _validatorList == null ? EMPTY_VALIDATOR_ARRAY
                : _validatorList.toArray(new Validator[_validatorList.size()]);
    }
720374
public function validated()
    {
        if ($this->invalid()) {
            throw new ValidationException($this);
        }

        $results = [];

        $missingValue = Str::random(10);

        foreach (array_keys($this->getRules()) as $key) {
            $value = data_get($this->getData(), $key, $missingValue);

            if ($value !== $missingValue) {
                Arr::set($results, $key, $value);
            }
        }

        return $results;
    }
176218
protected function getValidatorInstance(): Validator
    {
        $factory = $this->container->make(ValidationFactory::class);

        if (method_exists($this, 'validator')) {
            $validator = $this->container->call([$this, 'validator'], compact('factory'));
        } else {
            $validator = $this->createDefaultValidator($factory);
        }

        if (method_exists($this, 'withValidator')) {
            $this->withValidator($validator);
        }

        return $validator;
    }
1125848
public function getValidElementTypes(){
        return array(
            'oat\\taoQtiItem\\model\\qti\\Img',
            'oat\\taoQtiItem\\model\\qti\\Math',
            'oat\\taoQtiItem\\model\\qti\\feedback\\Feedback',
            \oat\taoQtiItem\model\qti\QtiObject::class,
            'oat\\taoQtiItem\\model\\qti\\Tooltip',
            'oat\\taoQtiItem\\model\\qti\\interaction\\Interaction',
            'oat\\taoQtiItem\\model\\qti\\RubricBlock',
            'oat\\taoQtiItem\\model\\qti\\InfoControl',
            'oat\\taoQtiItem\\model\\qti\\XInclude',
            \oat\taoQtiItem\model\qti\Table::class,
        );
    }
245776
private static function _processValidators()
    {
        foreach ($_SESSION['__ZF']['VALID'] as $validator_name => $valid_data) {
            if (!class_exists($validator_name)) {
                require_once 'Zend/Loader.php';
                Zend_Loader::loadClass($validator_name);
            }
            $validator = new $validator_name;
            if ($validator->validate() === false) {
                /** @see Zend_Session_Exception */
                require_once 'Zend/Session/Exception.php';
                throw new Zend_Session_Exception("This session is not valid according to {$validator_name}.");
            }
        }
    }
668385
public function getInvalidOrMissingErrors()
    {
        $all = $this->invalidAttribs + $this->missingAttribs;
        return array_combine(
            array_keys($all),
            array_map(function ($ref) {
                return $ref['error'];
            }, array_values($all))
        );
    }
312697
public function getQualifiedOrderByColumns()
    {
        $columns   = $this->cmsOrderBy;
        $qualified = [];

        if (empty($columns)) return [];

        foreach ($columns as $column => $direction) {
            $qualified[ $this->getTable() . '.' . $column ] = $direction;
        }

        return $qualified;
    }
1232152
protected function getValidatorsForFields(array $elements = [])
    {
        $return = [];
        foreach ($this->validators as $key => $validator) {
            if (!empty($elements) && !array_intersect($elements, $validator->getElements())) {
                continue;
            }
            $return[$key] = $validator;
        }
        $rules = $this->getRules();
        foreach ($rules as $key => $rule) {
            if (isset($return[$key]) || !empty($elements) && !array_intersect($elements, $rule[0])) {
                continue;
            }
            $return[$key] = $this->getValidator($key);
        }

        return array_values($return);
    }