mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
10 lines
298 B
JavaScript
10 lines
298 B
JavaScript
export function volumeSize(size, getters, errors, validatorArgs, displayKey, value) {
|
|
if (!/^([1-9][0-9]{0,8})[a-zA-Z]+$/.test(size)) {
|
|
const message = getters['i18n/t']('harvester.validation.generic.maximumSize', { max: '999999999 GiB' });
|
|
|
|
errors.push(message);
|
|
}
|
|
|
|
return errors;
|
|
}
|