src/Util/Validator.php
protected function validateContains($field, $value, $params)
    {
        if (!isset($params[0])) {
            return false;
        }
        if (!\is_string($value) || !\is_string($params[0])) {
            return false;
        }

        $strict = true;
        if (isset($params[1])) {
            $strict = (bool) $params[1];
        }

        if ($strict) {
            return \mb_strpos($value, $params[0]) !== false;
        }

        return \mb_stripos($value, $params[0]) !== false;
    }
protected function validateContains($field, $value, $params)
    {
        if (!isset($params[0])) {
            return false;
        }
        if (!\is_string($value) || !\is_string($params[0])) {
            return false;
        }

        $strict = true;
        if (isset($params[1])) {
            $strict = (bool) $params[1];
        }

        if ($strict) {
            return \mb_strpos($value, $params[0]) !== false;
        }

        return \mb_stripos($value, $params[0]) !== false;
    }
protected function validateContains ( $ field , $ value , $ params ) { if ( ! isset ( $ params [ 0 ] ) ) { return false ; } if ( ! \ is_string ( $ value ) || ! \ is_string ( $ params [ 0 ] ) ) { return false ; } $ strict = true ; if ( isset ( $ params [ 1 ] ) ) { $ strict = ( bool ) $ params [ 1 ] ; } if ( $ strict ) { return \ mb_strpos ( $ value , $ params [ 0 ] ) !== false ; } return \ mb_stripos ( $ value , $ params [ 0 ] ) !== false ; }
Validate a field contains a given string

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

@return bool
Validate a field contains a given string