blob: 41e00d046f10f5d0e9e9f98a56f22a78034ad83c (
plain) (
tree)
|
|
'use strict'
const validator = require('express-validator').validator
const constants = require('../../initializers/constants')
const USERS_CONSTRAINTS_FIELDS = constants.CONSTRAINTS_FIELDS.USERS
const usersValidators = {
isUserUsernameValid: isUserUsernameValid
}
function isUserUsernameValid (value) {
return validator.isLength(value, USERS_CONSTRAINTS_FIELDS.USERNAME)
}
// ---------------------------------------------------------------------------
module.exports = usersValidators
|