0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-30 08:52:38 +00:00
Files
homebrewery/client/homebrew/editor/metadataEditor/validations.js
2022-11-04 15:32:20 -05:00

24 lines
434 B
JavaScript

module.exports = {
title : [
(value)=>{
return value?.length > 10 ? 'Max URL length of 10 characters' : null;
}
],
description : [
(value)=>{
return value?.length > 10 ? 'Max URL length of 10 characters' : null;
}
],
thumbnail : [
(value)=>{
return value?.length > 5 ? 'Max URL length of 5 characters' : null;
},
(value)=>{
return (value ?? '')[0] !== 'W' ? 'URL must start with W' : null;
}
]
};