Init commit
This commit is contained in:
22
server/core/helpers/custom-validators/accounts.ts
Normal file
22
server/core/helpers/custom-validators/accounts.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { isUserDescriptionValid, isUserUsernameValid } from './users.js'
|
||||
import { exists } from './misc.js'
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user