Skip to content

multiple rules in validate() for File Upload not working #1201

Description

@samsonasik

Based on documentation, it shown :

$this->validate([
    'avatar' => 'uploaded[avatar]|max_size[avatar,1024]'
]);

It will get the following error:

CodeIgniter\Validation\Exceptions\ValidationException: up is not a valid rule.

The current working solution is:

$this->validate([
    'avatar' => [
            'uploaded[avatar]',
            'max_size[avatar,1024]',
        ],
]);

is it the documentation issue or the Validation bug ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions