Added spoiler's validation rule
This commit is contained in:
parent
bdb2338ab9
commit
c90495eb1c
43
validation/spoilers.json
Normal file
43
validation/spoilers.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"$jsonSchema": {
|
||||
"required": [
|
||||
"user",
|
||||
"completed",
|
||||
"description",
|
||||
"photo",
|
||||
"video",
|
||||
"animation",
|
||||
"text"
|
||||
],
|
||||
"properties": {
|
||||
"user": {
|
||||
"bsonType": ["int", "long"],
|
||||
"description": "Telegram ID of user"
|
||||
},
|
||||
"completed": {
|
||||
"bsonType": "bool",
|
||||
"description": "Whether spoiler is a completed one"
|
||||
},
|
||||
"description": {
|
||||
"bsonType": ["string", "null"],
|
||||
"description": "Spoiler's description"
|
||||
},
|
||||
"photo": {
|
||||
"bsonType": ["string", "null"],
|
||||
"description": "Spoilered photo"
|
||||
},
|
||||
"video": {
|
||||
"bsonType": ["string", "null"],
|
||||
"description": "Spoilered video"
|
||||
},
|
||||
"animation": {
|
||||
"bsonType": ["string", "null"],
|
||||
"description": "Spoilered animation/GIF"
|
||||
},
|
||||
"text": {
|
||||
"bsonType": ["string", "null"],
|
||||
"description": "Spoilered text"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user