src/Services/EntityService.php
protected function getValidationRulesForAttributes(array $modelParams, array $rules = []): array
    {
        $modelRules = empty($rules) ? $this->getValidationRules() : $rules;
        return array_intersect_key($modelRules, $modelParams);
    }
protected function getValidationRulesForAttributes(array $modelParams, array $rules = []): array
    {
        $modelRules = empty($rules) ? $this->getValidationRules() : $rules;
        return array_intersect_key($modelRules, $modelParams);
    }
protected function getValidationRulesForAttributes ( array $ modelParams , array $ rules = [ ] ) : array { $ modelRules = empty ( $ rules ) ? $ this -> getValidationRules ( ) : $ rules ; return array_intersect_key ( $ modelRules , $ modelParams ) ; }
Return rules for given attributes.

@param array $modelParams Updating fields
@param array $rules Custom validation rules

@return array
Return rules for given attributes .