mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Cleanup
We must not expose private actor objects to clients Just make 2 GET requests on channel/accounts instead
This commit is contained in:
parent
d6d96bed80
commit
012580d98f
21 changed files with 221 additions and 397 deletions
|
@ -1,12 +1,14 @@
|
|||
import { Validators } from '@angular/forms'
|
||||
import { BuildFormValidator } from './form-validator.model'
|
||||
|
||||
export const USER_USERNAME_REGEX_CHARACTERS = '[a-z0-9][a-z0-9._]'
|
||||
|
||||
export const USER_USERNAME_VALIDATOR: BuildFormValidator = {
|
||||
VALIDATORS: [
|
||||
Validators.required,
|
||||
Validators.minLength(1),
|
||||
Validators.maxLength(50),
|
||||
Validators.pattern(/^[a-z0-9][a-z0-9._]*$/)
|
||||
Validators.pattern(new RegExp(`^${USER_USERNAME_REGEX_CHARACTERS}*$`))
|
||||
],
|
||||
MESSAGES: {
|
||||
'required': $localize`Username is required.`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue