Max Hosts shows up in Org Detail View

Signed-off-by: catjones9 <catjones@redhat.com>
This commit is contained in:
catjones9
2019-06-07 12:27:32 -04:00
parent 19b41743de
commit 5874becb00
3 changed files with 73 additions and 5 deletions

View File

@@ -18,3 +18,12 @@ export function maxLength (max, i18n) {
return undefined;
};
}
export function minMaxValue (min, max, i18n) {
return value => {
if (typeof value !== 'number' || value > max || value < min) {
return i18n._(t`This field must be a number and have a value between ${min} and ${max}`);
}
return undefined;
};
}