protected function getValidationRules($inputName, $validator)
    {
        $validator->onUpload();
        $rules      = $validator->getValidationRules();
        $attributes = [];
        foreach ($rules[$inputName] as $rule) {
            if (strpos($rule, ':') !== FALSE) {
                list($rulename, $value) = explode(':', $rule);
                switch ($rulename) {
                    case 'mimes':
                        $separator = ',';
                        $value     = implode($separator, array_map(function($item) {
                                    return '.' . $item;
                                }, explode($separator, $value)));
                        $attributes['acceptedFiles'] = $value;
                        break;
                    case 'max':
                        $attributes['maxFilesize']   = $value / 1024;
                        break;
                    case 'min':
                        $attributes['minFilesize']   = $value / 1024;
                        break;
                }
            }
        }
        return $attributes;
    }