mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Implement support field in video and video channel
This commit is contained in:
parent
34cbef8c6c
commit
2422c46b27
49 changed files with 490 additions and 146 deletions
|
@ -21,6 +21,10 @@ function isUserUsernameValid (value: string) {
|
|||
return exists(value) && validator.matches(value, new RegExp(`^[a-z0-9._]{${min},${max}}$`))
|
||||
}
|
||||
|
||||
function isUserDescriptionValid (value: string) {
|
||||
return value === null || (exists(value) && validator.isLength(value, CONSTRAINTS_FIELDS.USERS.DESCRIPTION))
|
||||
}
|
||||
|
||||
function isBoolean (value: any) {
|
||||
return typeof value === 'boolean' || (typeof value === 'string' && validator.isBoolean(value))
|
||||
}
|
||||
|
@ -54,5 +58,6 @@ export {
|
|||
isUserUsernameValid,
|
||||
isUserDisplayNSFWValid,
|
||||
isUserAutoPlayVideoValid,
|
||||
isUserDescriptionValid,
|
||||
isAvatarFile
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue