Siema mam pytanie wiem jak zwalidować inputy oddzielnie ale jak zrobic jesli chce sprawdzic czy password1 pasuje do password2?
<div class="form-group">
<label>Haslo</label>
<input type="password" name="password1" ng-minlength="5" ng-maxlength="10" class="form-control" ng-model="user.password1" ng-required="true" placeholder="wrzuć imię">
<span ng-show="frm.password1.$touched && frm.password1.$error.required">Required</span>
<span ng-show="frm.password1.$touched && frm.password1.$error.minlength">too short</span>
<span ng-show="frm.password1.$touched && frm.password1.$error.maxlength">too long</span>
</div>
<div class="form-group">
<label>Powtórz hasło</label>
<input type="password" name="password2" ng-minlength="5" ng-maxlength="10" class="form-control" ng-model="user.password2" ng-required="true" placeholder="wrzuć imię">
<span ng-show="frm.password2.$touched && frm.password2.$error.required">Required</span>
<span ng-show="frm.password2.$touched && frm.password2.$error.minlength">too short</span>
<span ng-show="frm.password2.$touched && frm.password2.$error.maxlength">too long</span>
</div>
Musze to zrobic w controllerze?