Skip to content

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

@jlopes90

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

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