Merge pull request #3256 from yariplus/mintags

Add minimum tags per topic setting.
This commit is contained in:
Barış Soner Uşaklı
2015-07-18 14:02:06 -04:00
6 changed files with 26 additions and 4 deletions

View File

@@ -284,6 +284,8 @@ SocketPosts.edit = function(socket, data, callback) {
return callback(new Error('[[error:title-too-short, ' + meta.config.minimumTitleLength + ']]'));
} else if (data.title && data.title.length > parseInt(meta.config.maximumTitleLength, 10)) {
return callback(new Error('[[error:title-too-long, ' + meta.config.maximumTitleLength + ']]'));
} else if (data.tags && data.tags.length < parseInt(meta.config.minimumTagsPerTopic, 10)) {
return callback(new Error('[[error:not-enough-tags, ' + meta.config.minimumTagsPerTopic + ']]'));
} else if (!data.content || data.content.length < parseInt(meta.config.minimumPostLength, 10)) {
return callback(new Error('[[error:content-too-short, ' + meta.config.minimumPostLength + ']]'));
} else if (data.content.length > parseInt(meta.config.maximumPostLength, 10)) {