src/Validate/Required.php
public function isRequired() : Testable
    {
        $this->attributes['required'] = true;
        return $this->addTest('required', function ($value) {
            if (is_array($value)) {
                return $value;
            }
            return strlen(trim($value));
        });
    }
public function isRequired() : Testable
    {
        $this->attributes['required'] = true;
        return $this->addTest('required', function ($value) {
            if (is_array($value)) {
                return $value;
            }
            return strlen(trim($value));
        });
    }
public function isRequired ( ) : Testable { $ this -> attributes [ 'required' ] = true ; return $ this -> addTest ( 'required' , function ( $ value ) { if ( is_array ( $ value ) ) { return $ value ; } return strlen ( trim ( $ value ) ) ; } ) ; }
This is a required field.

@return self
This is a required field .