@gitlab/ui
Version:
GitLab UI Components
13 lines (10 loc) • 338 B
JavaScript
// Creates out of validation configurations from .documentation.js files and creates a readable string out of it
const getValidationInfoText = (validation = {}) => {
switch (validation.type) {
case 'range':
return `${validation.min}-${validation.max}`;
default:
return '';
}
};
export { getValidationInfoText };