question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Confirmed validation is not working

See original GitHub issue

Versions:

  • VueJs: 2.0.1
  • Vee-Validate: 2.0.0-beta.22

Description:

The confirmed validation is throwing Uncaught TypeError: Right-hand side of 'instanceof' is not callable

Steps To Reproduce:

<div :class="{'form-group': true, 'has-error': errors.has('password')}">
    <label for="password" class="control-label">New password</label>
    <input v-validate="'required|confirmed'" type="password" class="form-control" id="password" name="password" placeholder="New Password" v-model="settings.password">
    <p class="help-block" v-if="errors.has('password')">{{errors.first('password')}}</p>
</div><!--end form group-->

<div :class="{'form-group': true, 'has-error': errors.has('password_confirmation')}">
    <label for="password_confirmation" class="control-label">Verify password</label>
    <input v-validate="'required'" type="password" class="form-control" id="password_confirmation" name="password_confirmation" placeholder="Verify password" v-model="settings.password_confirmation">
</div><!--end form group-->

I’ve tried with having the target field in there & without.

It’s failing on this line: https://github.com/logaretm/vee-validate/blob/437f816d910d6f4ad9e23eddd1602f5d0c528cb0/src/listeners.js#L132

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
darrena092commented, Aug 29, 2018

If it helps anyone - this didn’t work for me until I included ref='password_confirmation' in my confirmation input.

1reaction
logaretmcommented, May 5, 2017

@AGPDev it does not work properly with custom components, will try to implement it or change how confirmed and similar rules behave.

Read more comments on GitHub >

github_iconTop Results From Across the Web

laravel password confirm doesn't work - Stack Overflow
This is best approach for password confirmation: 'password' => 'required|between:8,255|confirmed'. Explain: confirmed: The field under validation must have ...
Read more >
Laravel Confirm Password is not working - Laracasts
By default laravel's confirmed validation looks for the name (password) and adds _confirmation. In your form the password confirmation should be named password ......
Read more >
Validation - Laravel Livewire
If validation fails, a standard ValidationException is thrown (and caught by Livewire), and the standard $errors object is available inside the component's ...
Read more >
Validation Rules - VeeValidate
The field under validation must have the same value as the confirmation field. ... The field under validation length may not exceed the...
Read more >
magento2 - Confirm Password Validation Not Working
I have the same issue, I believe it is because I added modal login/register form to all pages in my theme. The register...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found