0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-06 05:42:40 +00:00

move validations into it's own file.

This commit is contained in:
Gazook89
2022-11-04 15:32:20 -05:00
parent 7696be5d95
commit 589ec0251a
2 changed files with 33 additions and 17 deletions

View File

@@ -0,0 +1,23 @@
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;
}
]
};