src/Util/Validator.php
protected function validateRequired($field, $value, array $params = [], array $fields = [])
    {
        if (isset($params[0]) && (bool) $params[0]) {
            $find = $this->getPart($fields, \explode('.', $field), true);

            return $find[1];
        }

        if (null === $value) {
            return false;
        }

        if (\is_string($value) && \trim($value) === '') {
            return false;
        }

        return true;
    }
protected function validateRequired($field, $value, array $params = [], array $fields = [])
    {
        if (isset($params[0]) && (bool) $params[0]) {
            $find = $this->getPart($fields, \explode('.', $field), true);

            return $find[1];
        }

        if (null === $value) {
            return false;
        }

        if (\is_string($value) && \trim($value) === '') {
            return false;
        }

        return true;
    }
protected function validateRequired ( $ field , $ value , array $ params = [ ] , array $ fields = [ ] ) { if ( isset ( $ params [ 0 ] ) && ( bool ) $ params [ 0 ] ) { $ find = $ this -> getPart ( $ fields , \ explode ( '.' , $ field ) , true ) ; return $ find [ 1 ] ; } if ( null === $ value ) { return false ; } if ( \ is_string ( $ value ) && \ trim ( $ value ) === '' ) { return false ; } return true ; }
Required field validator

@param string $field
@param mixed  $value
@param array  $params
@param array  $fields

@return bool
Required field validator