-1

                                            <div class="form-group">
                                                <label class="control-label control-label-1">Password</label>
                                                <input type="password" placeholder="Password" name="password" class="form-control form-control-1" ng-model="Userdata.password" required="">

                                            </div>

                                        </div>

                                        <div class="col-xs-6">  

                                            <div class="form-group"> 
                                                <label class="control-label control-label-1">Retype Password</label>
                                                <input type="password" placeholder="Retype Password" name="password2" class="form-control form-control-1" ng-model="Userdata.password2" required="">
                                               <div ng-show="Userdata.password != Userdata.password2">Password mis match!</div>

                                            </div>  

                                        </div>   

password and password confirmation field is not working properly,error message is displaying before entering the confirm field, that is when the password field entering itself. how can i make the code properly.

1
  • When are you expecting to show the error?? once user has done entering the second password or while user is entering sencond password? Commented Sep 1, 2016 at 11:22

1 Answer 1

2

Add AND condition in your ng-show,

<div ng-show="(Userdata.password && Userdata.password2 && (Userdata.password != Userdata.password2))">Password mis match!</div>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.