init
This commit is contained in:
commit
d761a10bf7
102 changed files with 4761 additions and 0 deletions
112
lib/constraints.ts
Normal file
112
lib/constraints.ts
Normal file
|
@ -0,0 +1,112 @@
|
|||
const constraints = {
|
||||
username: {
|
||||
min: 2,
|
||||
max: 32,
|
||||
},
|
||||
password: {
|
||||
min: 8,
|
||||
max: 64,
|
||||
},
|
||||
email: {
|
||||
min: 3,
|
||||
max: 64,
|
||||
},
|
||||
};
|
||||
|
||||
const widgetConstraints = {
|
||||
externalSite: {
|
||||
title: {
|
||||
min: 0,
|
||||
max: 32,
|
||||
},
|
||||
url: {
|
||||
min: 0,
|
||||
max: 250,
|
||||
},
|
||||
},
|
||||
instagramPost: {
|
||||
url: {
|
||||
min: 0,
|
||||
max: 250,
|
||||
},
|
||||
},
|
||||
markdown: {
|
||||
content: {
|
||||
min: 0,
|
||||
max: 1000,
|
||||
},
|
||||
},
|
||||
pinterestPin: {
|
||||
url: {
|
||||
min: 0,
|
||||
max: 250,
|
||||
},
|
||||
},
|
||||
soundCloudTrack: {
|
||||
url: {
|
||||
min: 0,
|
||||
max: 250,
|
||||
},
|
||||
},
|
||||
title: {
|
||||
content: {
|
||||
min: 0,
|
||||
max: 32,
|
||||
},
|
||||
},
|
||||
twitchLive: {
|
||||
url: {
|
||||
min: 0,
|
||||
max: 250,
|
||||
},
|
||||
},
|
||||
twitterPost: {
|
||||
url: {
|
||||
min: 0,
|
||||
max: 250,
|
||||
},
|
||||
},
|
||||
youTubeVideo: {
|
||||
url: {
|
||||
min: 0,
|
||||
max: 250,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const editorConstraints = {
|
||||
...constraints,
|
||||
...widgetConstraints,
|
||||
displayName: {
|
||||
min: 0,
|
||||
max: 30,
|
||||
},
|
||||
description: {
|
||||
min: 0,
|
||||
max: 250,
|
||||
},
|
||||
location: {
|
||||
min: 0,
|
||||
max: 20,
|
||||
},
|
||||
school: {
|
||||
min: 0,
|
||||
max: 30,
|
||||
},
|
||||
workplace: {
|
||||
min: 0,
|
||||
max: 30,
|
||||
},
|
||||
widgets: {
|
||||
count: 15,
|
||||
},
|
||||
socialLinks: {
|
||||
count: 12,
|
||||
},
|
||||
socialTexts: {
|
||||
count: 5,
|
||||
},
|
||||
};
|
||||
|
||||
export default constraints;
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue