]>
git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/helpers/custom-validators/misc.js
3 const validator
= require('express-validator').validator
5 const miscValidators
= {
11 function exists (value
) {
12 return value
!== undefined && value
!== null
15 function isArray (value
) {
16 return Array
.isArray(value
)
19 function isEachUrl (urls
) {
20 return urls
.every(function (url
) {
21 return validator
.isURL(url
)
25 // ---------------------------------------------------------------------------
27 module
.exports
= miscValidators