public function fieldIsRequired($fieldName)
    {
        if ($rules = $this->getRulesForFieldName($fieldName)) {
            
            foreach ($rules as $rule) {
                
                if ($rule instanceof RequiredRule) {
                    return true;
                }
                
            }
            
        }
        
        return parent::fieldIsRequired($fieldName);
    }
public function fieldIsRequired($fieldName)
    {
        if ($rules = $this->getRulesForFieldName($fieldName)) {
            
            foreach ($rules as $rule) {
                
                if ($rule instanceof RequiredRule) {
                    return true;
                }
                
            }
            
        }
        
        return parent::fieldIsRequired($fieldName);
    }
public function fieldIsRequired ( $ fieldName ) { if ( $ rules = $ this -> getRulesForFieldName ( $ fieldName ) ) { foreach ( $ rules as $ rule ) { if ( $ rule instanceof RequiredRule ) { return true ; } } } return parent :: fieldIsRequired ( $ fieldName ) ; }
Answers true if the field with the given name is required.

@param string $fieldName

@return boolean
Answers true if the field with the given name is required .