Change account form validation for ahtorized overdraft.

This commit is contained in:
Alexis Lahouze 2017-07-20 23:34:07 +02:00
parent 6ff893a08d
commit 4064848242
2 changed files with 5 additions and 5 deletions

View File

@ -57,6 +57,8 @@
"angular-resource": "^1.6", "angular-resource": "^1.6",
"angular-strap": "^2.3.12", "angular-strap": "^2.3.12",
"angular-ui-notification": "^0.3", "angular-ui-notification": "^0.3",
"angular2-modal": "^3.0.1",
"angular2-notifications": "^0.7.4",
"base64util": "^1.0.2", "base64util": "^1.0.2",
"bootbox": "^4.4.0", "bootbox": "^4.4.0",
"bootstrap": "^3.3.7", "bootstrap": "^3.3.7",

View File

@ -34,13 +34,11 @@ import { Account } from './account';
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group"> <div class="input-group">
<div class="input-group-addon">-</div>
<input class="form-control" <input class="form-control"
type="number" placeholder="Authorized overdraft" type="number" placeholder="Authorized overdraft"
id="authorized-overdraft" name="authorized_overdraft" id="authorized-overdraft" name="authorized_overdraft"
[(ngModel)]="account.authorized_overdraft" #authorizedOverdraft="ngModel" [(ngModel)]="account.authorized_overdraft" #authorizedOverdraft="ngModel"
required min="0"> required max="0">
<div class="input-group-addon">.00</div> <div class="input-group-addon">.00</div>
</div> </div>
@ -50,8 +48,8 @@ import { Account } from './account';
The authorized overdraft is required. The authorized overdraft is required.
</p> </p>
<p [hidden]="!authorizedOverdraft.errors.min"> <p [hidden]="!authorizedOverdraft.errors.max">
The authorized overdraft must be equal or greater than 0. The authorized overdraft must be less than or equal to 0.
</p> </p>
</div> </div>
</div> </div>