aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/helpers/custom-validators/accounts.ts
blob: be196d2a46451ad4cdef645ee72ad101aef20da1 (plain) (tree)
1
2
3
4
5
6
7
8
                          
                                                                     
                               
 
                                             


                                   



                                           



                                                    


                                                                              
                   
                            
                    
 
import 'express-validator'
import { isUserDescriptionValid, isUserUsernameValid } from './users'
import { exists } from './misc'

function isAccountNameValid (value: string) {
  return isUserUsernameValid(value)
}

function isAccountIdValid (value: string) {
  return exists(value)
}

function isAccountDescriptionValid (value: string) {
  return isUserDescriptionValid(value)
}

// ---------------------------------------------------------------------------

export {
  isAccountIdValid,
  isAccountDescriptionValid,
  isAccountNameValid
}