From b9a3e09ad5a7673f64556d1dba122ed4c4fac980 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 7 Mar 2016 11:33:59 +0100 Subject: Prepare folders structure for angular app --- helpers/customValidators.js | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 helpers/customValidators.js (limited to 'helpers/customValidators.js') diff --git a/helpers/customValidators.js b/helpers/customValidators.js deleted file mode 100644 index 20c41f5da..000000000 --- a/helpers/customValidators.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict' - -var validator = require('validator') - -var customValidators = { - eachIsRemoteVideosAddValid: eachIsRemoteVideosAddValid, - eachIsRemoteVideosRemoveValid: eachIsRemoteVideosRemoveValid, - isArray: isArray -} - -function eachIsRemoteVideosAddValid (values) { - return values.every(function (val) { - return validator.isLength(val.name, 1, 50) && - validator.isLength(val.description, 1, 50) && - validator.isLength(val.magnetUri, 10) && - validator.isURL(val.podUrl) - }) -} - -function eachIsRemoteVideosRemoveValid (values) { - return values.every(function (val) { - return validator.isLength(val.magnetUri, 10) - }) -} - -function isArray (value) { - return Array.isArray(value) -} - -// --------------------------------------------------------------------------- - -module.exports = customValidators -- cgit v1.2.3