Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong password confirmed rule convertion #52

Closed
antonkomarev opened this issue Aug 17, 2015 · 4 comments
Closed

Wrong password confirmed rule convertion #52

antonkomarev opened this issue Aug 17, 2015 · 4 comments
Labels
Milestone

Comments

@antonkomarev
Copy link
Contributor

My FormRequest

public function rules()
{
    return [
        'email' => 'required|email',
        'password' => 'required|confirmed',
    ];
}

Converted to:

rules: {
  "email": {
    "laravelValidation": [
      [
        "Required",
        [

        ],
        "The email field is required.",
        true
      ],
      [
        "Email",
        [

        ],
        "The email must be a valid email address.",
        false
      ]
    ]
  },
  "password_confirmation": {
    "laravelValidation": [
      [
        "Required",
        [

        ],
        "The password field is required.",
        true
      ],
      [
        "Confirmed",
        [
          "password"
        ],
        "The password confirmation does not match.",
        false
      ]
    ]
  }
},
messages: [

],

There are no password field rules, they were applied to password_confirmed somehow.

@torrentalle
Copy link
Member

This is the expected beahviour. The rules are applied to password_confirmed to show the message in this element.

@antonkomarev
Copy link
Contributor Author

But required message displaying for password_confirmation field when password field isn't filled in

@torrentalle torrentalle added this to the 1.1.2 milestone Sep 4, 2015
torrentalle added a commit that referenced this issue Sep 4, 2015
Wrong password confirmed rule convertion #52
@torrentalle
Copy link
Member

Fixed in dev-master

@antonkomarev
Copy link
Contributor Author

It's working, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants