protected function validateByOwnMethods(Validation $validation, array $input, array $ownRules, AppliesToResource $resource=null, $locale=null)
    {
        foreach ($ownRules as $key=>$keyRules) {
            $vars = [
                'input'    => $input,
                'key'      => $key,
                'value'    => Helper::value($input, $key),
                'resource' => $resource,
                'locale'   => $locale
            ];

            foreach ($keyRules as $ruleName=>$parameters) {
                if ($this->validateByOwnMethod($ruleName, $vars, $parameters)) {
                    continue;
                }

                $validation->addFailure($key, $ruleName, $parameters);
            }
        }
    }
protected function validateByOwnMethods(Validation $validation, array $input, array $ownRules, AppliesToResource $resource=null, $locale=null)
    {
        foreach ($ownRules as $key=>$keyRules) {
            $vars = [
                'input'    => $input,
                'key'      => $key,
                'value'    => Helper::value($input, $key),
                'resource' => $resource,
                'locale'   => $locale
            ];

            foreach ($keyRules as $ruleName=>$parameters) {
                if ($this->validateByOwnMethod($ruleName, $vars, $parameters)) {
                    continue;
                }

                $validation->addFailure($key, $ruleName, $parameters);
            }
        }
    }
protected function validateByOwnMethods ( Validation $ validation , array $ input , array $ ownRules , AppliesToResource $ resource = null , $ locale = null ) { foreach ( $ ownRules as $ key => $ keyRules ) { $ vars = [ 'input' => $ input , 'key' => $ key , 'value' => Helper :: value ( $ input , $ key ) , 'resource' => $ resource , 'locale' => $ locale ] ; foreach ( $ keyRules as $ ruleName => $ parameters ) { if ( $ this -> validateByOwnMethod ( $ ruleName , $ vars , $ parameters ) ) { continue ; } $ validation -> addFailure ( $ key , $ ruleName , $ parameters ) ; } } }
Perform all validation by the custom methods of this class

@param Validation        $validation
@param array             $input
@param array             $ownRules
@param AppliesToResource $resource (optional)
@param string            $locale (optional)
Perform all validation by the custom methods of this class