Reputation: 2117
I have a form and I want to check if all the fields are valid or not.
Currently I am using four different methods. Nothing is working. Here is my plunker:
http://plnkr.co/edit/c4czI1W1fvXR4881SP1z?p=preview
Here are the methods I am using to check for validity
<button ng-click="my.$valid && validityCheck()">Update</button>
<div>myForm.$valid = {{myForm.$valid}}</div>
<span ng-show="myForm.$valid" style="color:green">Yippii!</span>
<span ng-show="myForm.$invalid" style="color:red">Not :(</span>
Upvotes: 1
Views: 94
Reputation: 62260
Plunkder code has few errors.
ng-click="myForm.$valid
function($scope){
http://plnkr.co/edit/Twz9E9LnQ08IpweLARjG
Upvotes: 2