Added the Sheepstar API to the Archive
This commit is contained in:
26
SheepstarAPIV1/validation/linkValidation.js
Normal file
26
SheepstarAPIV1/validation/linkValidation.js
Normal file
@ -0,0 +1,26 @@
|
||||
const Joi = require('joi');
|
||||
|
||||
module.exports.short = Joi.object({
|
||||
original_url: Joi.string()
|
||||
.min(5)
|
||||
.uri()
|
||||
.max(250)
|
||||
.required(),
|
||||
custom_url: Joi.string()
|
||||
.alphanum()
|
||||
.min(2)
|
||||
.max(15),
|
||||
show_meta_data: Joi.bool(),
|
||||
meta_title: Joi.string()
|
||||
.min(2)
|
||||
.max(25),
|
||||
meta_description: Joi.string()
|
||||
.min(5)
|
||||
.max(100),
|
||||
meta_image: Joi.string()
|
||||
.uri()
|
||||
.min(5)
|
||||
.max(255),
|
||||
meta_color: Joi.string()
|
||||
.pattern(new RegExp("^#[A-Fa-f0-9]{6}$"))
|
||||
});
|
Reference in New Issue
Block a user