Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Matching validation issues #68

Closed
Closed

Description

@aaronbc

I created the following issues using the live demo:

Issue 1:

  1. Enter a password into the password field.
  2. Enter an identical password into the confirmation field.
  3. Before submit, go back and change the password field.
  4. Passwords validate even though they do not match anymore.

Issue 2:

  1. Remove the 'required' validation condition of the password and confirmation inputs.
  2. Enter a password into the password field.
  3. Passwords validate even though the confirmation is blank.

Activity

  1. ghiscoding commented on Sep 11, 2015

    @ghiscoding
    Owner

    Yes I can see the behavior since only changing the value on the confirmation input will trigger a validation action, basically there is no watch on the parent input (which is why the input stays valid after changing your password). I'm not crazy on having Angular-Validation to add multiple watch, but I don't think there is any other way to do it.

    So I will see if I can add a $watch on the parent input (like the password field for example). That would probably fix both your issues when it becomes available.

  2. added a commit that references this issue on Sep 13, 2015
  3. ghiscoding commented on Sep 13, 2015

    @ghiscoding
    Owner

    Added a $watch on the parent field (for example Password) so that the matching input gets notified (example Password Confirmation).
    Also note that it affects all matching validators, that is:

    1. match: n,
    2. different: n

    Both your issues should now be fixed, if not let me know
    Thanks for reporting it

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions