Skip to content

Bug: Validation only password and confirmation and there was an error #358

Description

@jlopes90

PHP Version

7.4.30

CodeIgniter4 Version

4.2.3

Shield Version

develop

Which operating systems have you tested for this bug?

Windows

Which server did you use?

apache

Database

MySQL 5.7.36

Did you customize Shield?

No

What happened?

I filled in the form with password and confirm password and validation failed.

Steps to Reproduce

public function resetAction()
{
    $rules = [
        'password' => [
            'required',
            'strong_password'
        ],
        'password_confirm' => [
            'required',
            'matches[password]',
        ],
    ];
    
    if (!$this->validate($rules)) {
        return redirect()->back()->withInput()->with('errors', $this->validator->getErrors());
    }

    {...}
}

imagem

Expected Output

imagem

Anything else?

No response

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