Here is my code in Angular JS to check if two password fields match.

And the HTML tags look like this:

Also, you may want to add some CSS styling to your password fields to highlight its border to red if the value is not valid. Just add this CSS code:

Here is a method I created to compare two TreePath objects if they have the same set of paths from the leaf node up to the root. The code is pretty simple. I first check if they have the same number of path objects. If they do not, then it is considered as not equal. Second, if any of the node label text is not the same from the other, then the method returns false.

Related Posts Plugin for WordPress, Blogger...