Skip to content

Showing :attribute instead of attribute name in error message #971

Open
@rushabh-indianic

Description

@rushabh-indianic

Showing :attribute instead of attribute name

I have a profile page in my application where users can update their password. The field names are 'new_password' and 'confirm_new_password,' and my password rules are as follows:

Password::min(8)
       ->mixedCase()
       ->letters()
       ->numbers()
       ->symbols()
       ->uncompromised(),

If I type an incorrect password format, it shows:
'The :attribute must contain at least one uppercase and one lowercase letter.'
instead of:
'The new_password must contain at least one uppercase and one lowercase letter.'

I have searched in issues but could not find any answers. Please help me out here.

Your environment

  • version of this package: 4.8.0
  • version of Laravel: ^9

Steps to reproduce

Enter wrong format of password

Expected behaviour

The new_password must contain at least one uppercase and one lowercase letter.

Actual behaviour

The :attribute must contain at least one uppercase and one lowercase letter.

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