mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 720: #1919 Bugfix Reading Age Filter should contain only numbers
#1919 Bugfix Reading Age Filter should contain only numbers
This commit is contained in:
committed by
Lorenz Hilpert
parent
4422a62f92
commit
f1065e8592
@@ -34,6 +34,8 @@ export class UiRangeFilterComponent implements OnInit, OnChanges {
|
||||
return `Der Wert darf nicht kleiner als ${errors[key].min} sein.`;
|
||||
case 'max':
|
||||
return `Der Wert darf nicht größer als ${errors[key].max} sein.`;
|
||||
case 'pattern':
|
||||
return `Es werden nur ganzzahlige Werte akzeptiert.`;
|
||||
default:
|
||||
return errors[key];
|
||||
}
|
||||
@@ -47,11 +49,13 @@ export class UiRangeFilterComponent implements OnInit, OnChanges {
|
||||
start: this.fb.control(this.filter.options[0].value, [
|
||||
Validators.min(0),
|
||||
Validators.max(99),
|
||||
Validators.pattern('^[0-9]+$'), // Only numbers
|
||||
maxValueRelativeTo((c) => c?.parent?.get('stop')),
|
||||
]),
|
||||
stop: this.fb.control(this.filter.options[1].value, [
|
||||
Validators.min(0),
|
||||
Validators.max(99),
|
||||
Validators.pattern('^[0-9]+$'), // Only numbers
|
||||
minValueRelativeTo((c) => c?.parent?.get('start')),
|
||||
]),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user