protected function getFormFieldModelInformationBasedRules(ModelFormFieldDataInterface $field)
    {
        $key              = $field->key();
        $modelInformation = $this->getModelInformation();


        if (array_key_exists($key, $modelInformation->attributes)) {

            return $this->getAttributeValidationResolver()->determineValidationRules(
                $modelInformation->attributes[ $key ],
                $field
            );
        }

        if (array_key_exists($key, $modelInformation->relations)) {

            return $this->getRelationValidationResolver()->determineValidationRules(
                $modelInformation->relations[ $key ],
                $field
            );
        }

        return false;
    }
protected function getFormFieldModelInformationBasedRules(ModelFormFieldDataInterface $field)
    {
        $key              = $field->key();
        $modelInformation = $this->getModelInformation();


        if (array_key_exists($key, $modelInformation->attributes)) {

            return $this->getAttributeValidationResolver()->determineValidationRules(
                $modelInformation->attributes[ $key ],
                $field
            );
        }

        if (array_key_exists($key, $modelInformation->relations)) {

            return $this->getRelationValidationResolver()->determineValidationRules(
                $modelInformation->relations[ $key ],
                $field
            );
        }

        return false;
    }
protected function getFormFieldModelInformationBasedRules ( ModelFormFieldDataInterface $ field ) { $ key = $ field -> key ( ) ; $ modelInformation = $ this -> getModelInformation ( ) ; if ( array_key_exists ( $ key , $ modelInformation -> attributes ) ) { return $ this -> getAttributeValidationResolver ( ) -> determineValidationRules ( $ modelInformation -> attributes [ $ key ] , $ field ) ; } if ( array_key_exists ( $ key , $ modelInformation -> relations ) ) { return $ this -> getRelationValidationResolver ( ) -> determineValidationRules ( $ modelInformation -> relations [ $ key ] , $ field ) ; } return false ; }
Returns validation rules based on model information for a given form field.

@param ModelFormFieldDataInterface|ModelFormFieldData|null $field
@return array|false
Returns validation rules based on model information for a given form field .