i think it should be `$scope.passwordValid = validFormat(passwordNew);`
u don't have to check if `passwordConfirm` is valid, u will check if it equals to `passwordNew` which must be valid. and u don't check if old password is valid, this criteria might change, it will be checked on server if it matches what is there already.

it might be better to set those methods on scope and do validations in view to provide instant feedback via:
`<div class="alert" ng-show="!validFormat(user.passwordNew)">Please provide longer password.</div>`

`<div class="alert" ng-show="user.passwordNew !== user.passwordConfirm && user.passwordNew && user.passwordConfirm">passwords don't match</div>`

etc.