Commit b19b525bb560d03e1b272c7514a1faece01f5c4a
1 parent
41554db9b8
Exists in
develop
fix
Showing
2 changed files
with
5 additions
and
0 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -69,6 +69,7 @@ angular.module('focaAbmChofer') |
| 69 | 69 | return; |
| 70 | 70 | } else if (!/^([\d]{7,10})$/.test(chofer.telefono)) { |
| 71 | 71 | focaModalService.alert('El campo Teléfono debe tener de 7 a 10 digitos'); |
| 72 | + return | |
| 72 | 73 | } |
| 73 | 74 | validaDni(chofer); |
| 74 | 75 | console.log('Todo ok, guardar chofer'); |
| ... | ... | @@ -227,11 +228,13 @@ angular.module('focaAbmChofer') |
| 227 | 228 | if (!/^([a-zA-ZÀ-ÿ ])*$/.test($scope.chofer.nombre)) { |
| 228 | 229 | focaModalService.alert('el campo Nombre no debe incluir números o símbolos') |
| 229 | 230 | $scope.chofer.nombre = '' |
| 231 | + return | |
| 230 | 232 | } |
| 231 | 233 | // Solo numeros en el campo documento |
| 232 | 234 | if (!/^([0-9])*$/.test($scope.chofer.dni)) { |
| 233 | 235 | focaModalService.alert('el campo DNI solo puede incluir números') |
| 234 | 236 | $scope.chofer.dni = '' |
| 237 | + return | |
| 235 | 238 | } |
| 236 | 239 | } |
| 237 | 240 | } |
src/views/foca-abm-choferes-listado.html
| ... | ... | @@ -106,6 +106,7 @@ |
| 106 | 106 | class="form-control" |
| 107 | 107 | type="text" |
| 108 | 108 | teclado-virtual |
| 109 | + ng-keyup="validarDatosChofer()" | |
| 109 | 110 | ng-model="chofer.nombre" |
| 110 | 111 | ng-required="true" |
| 111 | 112 | ng-keypress="next($event.keyCode)" |
| ... | ... | @@ -131,6 +132,7 @@ |
| 131 | 132 | type="text" |
| 132 | 133 | teclado-virtual |
| 133 | 134 | ng-model="chofer.dni" |
| 135 | + ng-keyup="validarDatosChofer()" | |
| 134 | 136 | ng-required="true" |
| 135 | 137 | ng-keypress="next($event.keyCode)" |
| 136 | 138 | foca-focus="focused == 2" |