src/Field/Generic.php
public function isRequired(): bool
    {
        foreach ($this->validationRules as $rule) {
            if ($rule instanceof Required) {
                return true;
            }
        }

        return false;
    }
public function isRequired(): bool
    {
        foreach ($this->validationRules as $rule) {
            if ($rule instanceof Required) {
                return true;
            }
        }

        return false;
    }
public function isRequired ( ) : bool { foreach ( $ this -> validationRules as $ rule ) { if ( $ rule instanceof Required ) { return true ; } } return false ; }
Checks whether the field is required

@return bool True when the field is required
Checks whether the field is required