diff --git a/src/app/organization/payment-types/create-payment-type/create-payment-type.component.html b/src/app/organization/payment-types/create-payment-type/create-payment-type.component.html index c1049ef83..3410d54b7 100644 --- a/src/app/organization/payment-types/create-payment-type/create-payment-type.component.html +++ b/src/app/organization/payment-types/create-payment-type/create-payment-type.component.html @@ -23,11 +23,14 @@ {{ 'labels.inputs.Position' | translate }} - + {{ 'labels.inputs.Position' | translate }} {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} + + {{ 'labels.inputs.Position' | translate }} must be a positive number. + diff --git a/src/app/organization/payment-types/create-payment-type/create-payment-type.component.ts b/src/app/organization/payment-types/create-payment-type/create-payment-type.component.ts index 142490e74..de675ec46 100644 --- a/src/app/organization/payment-types/create-payment-type/create-payment-type.component.ts +++ b/src/app/organization/payment-types/create-payment-type/create-payment-type.component.ts @@ -59,7 +59,9 @@ export class CreatePaymentTypeComponent implements OnInit { isCashPayment: [false], position: [ '', - Validators.required + [ + Validators.required, + Validators.min(1)] ] }); } diff --git a/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.html b/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.html index 9825db70e..a079f32b4 100644 --- a/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.html +++ b/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.html @@ -23,7 +23,10 @@ {{ 'labels.inputs.Position' | translate }} - + + + {{ 'labels.inputs.Position' | translate }} must be a positive number. + {{ 'labels.inputs.Position' | translate }} {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} diff --git a/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.ts b/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.ts index 893b23b6c..601c0aa3e 100644 --- a/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.ts +++ b/src/app/organization/payment-types/edit-payment-type/edit-payment-type.component.ts @@ -66,7 +66,9 @@ export class EditPaymentTypeComponent implements OnInit { isCashPayment: [this.paymentTypeData.isCashPayment], position: [ this.paymentTypeData.position, - Validators.required + [ + Validators.required, + Validators.min(1)] ] }); }