Password compare validation

2,408 views
Skip to first unread message

William Lepinski

unread,
Aug 22, 2012, 8:52:45 AM8/22/12
to ang...@googlegroups.com
Hello all.

Can anyone send me some link, jsfiddle, example containing a password compare validatior directive?
I'm trying to see some examples to check if I'm doing things right here.

Thanks in advance.

William Lepinski

unread,
Aug 22, 2012, 9:01:18 AM8/22/12
to ang...@googlegroups.com
Well,

Just found a link on the GitHub Wiki.
The code was using a old version of AngularJS so I updated the code using the new API.


:)

Efflam Daniel

unread,
Aug 22, 2012, 9:48:58 AM8/22/12
to ang...@googlegroups.com
There is a discussion about this topic on the angular-ui group :

William Lepinski

unread,
Aug 22, 2012, 1:54:10 PM8/22/12
to ang...@googlegroups.com
Thanks for the link!
I didn't know this group.

Pawel Kozlowski

unread,
Aug 22, 2012, 2:08:35 PM8/22/12
to ang...@googlegroups.com
Hi!

On Wed, Aug 22, 2012 at 7:54 PM, William Lepinski <wil...@gmail.com> wrote:
> Thanks for the link!
> I didn't know this group.

This is a group for http://angular-ui.github.com/.

So, now you've got 2 solutions, both working slightly differently:

1) http://jsfiddle.net/pkozlowski_opensource/GcxuT/23/ will compare
value in a second field with _model_ value of the first field
2) http://jsfiddle.net/S8TYF/ will compare value in a second field
with _input_ value of the first field

The difference might be subtle but has practical consequences: with
(2) the confirm validation will kick-in as soon as you start typing
anything in the first field. With (1) the confirm validation will
kick-in only after the first field is valid. In the e-mail confirm
example it means that you won't start showing confirmation errors till
e-mail validation errors are sorted out (so a user can focus on one
error at the time).

Cheers,
Pawel
Reply all
Reply to author
Forward
0 new messages