mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Add ability to update the user display name/description
This commit is contained in:
parent
d62cf3234c
commit
ed56ad1193
23 changed files with 215 additions and 19 deletions
|
@ -22,6 +22,10 @@ function isUserUsernameValid (value: string) {
|
|||
return exists(value) && validator.matches(value, new RegExp(`^[a-z0-9._]{${min},${max}}$`))
|
||||
}
|
||||
|
||||
function isUserDisplayNameValid (value: string) {
|
||||
return value === null || (exists(value) && validator.isLength(value, CONSTRAINTS_FIELDS.USERS.NAME))
|
||||
}
|
||||
|
||||
function isUserDescriptionValid (value: string) {
|
||||
return value === null || (exists(value) && validator.isLength(value, CONSTRAINTS_FIELDS.USERS.DESCRIPTION))
|
||||
}
|
||||
|
@ -60,6 +64,7 @@ export {
|
|||
isUserUsernameValid,
|
||||
isUserNSFWPolicyValid,
|
||||
isUserAutoPlayVideoValid,
|
||||
isUserDisplayNameValid,
|
||||
isUserDescriptionValid,
|
||||
isAvatarFile
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue