protected function getRulesForCustomFields($namespace)
    {
        $rules      = [];
        $brand      = antares('memory')->get('brand.default');
        $collection = app('antares.customfields.model.view')->query()->where('namespace', $namespace)->where('brand_id', $brand)->get();
        if ($collection->isEmpty()) {
            return $rules;
        }
        $collection->each(function($item) use(&$rules) {

            $validators = [];
            $item->config->each(function($config) use(&$validators) {
                $name          = $config->validator->name;
                $name == 'regex' && $config->value = implode('', ['[', $config->value, ']']);
                $rule          = ((!is_null($config->value) ? ':' . $config->value : ''));
                $validators[]  = $name . $rule;
            });

            $rules[$item->name] = $validators;
        });
        return $rules;
    }