mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Implemented configurable minimum signup age
Implements https://github.com/Chocobozzz/PeerTube/issues/3612 Fixed lint and removed debug Fixed another lint error Apply suggestions from code review Co-authored-by: Chocobozzz <chocobozzz@cpy.re> Add tests for min signup age config
This commit is contained in:
parent
f22e0e2c19
commit
1f256e7d3c
21 changed files with 55 additions and 11 deletions
|
@ -49,6 +49,15 @@ export const SIGNUP_LIMIT_VALIDATOR: BuildFormValidator = {
|
|||
}
|
||||
}
|
||||
|
||||
export const SIGNUP_MINIMUM_AGE_VALIDATOR: BuildFormValidator = {
|
||||
VALIDATORS: [Validators.required, Validators.min(1), Validators.pattern('[0-9]+')],
|
||||
MESSAGES: {
|
||||
'required': $localize`Signup minimum age is required.`,
|
||||
'min': $localize`Signup minimum age must be greater than 1.`,
|
||||
'pattern': $localize`Signup minimum age must be a number.`
|
||||
}
|
||||
}
|
||||
|
||||
export const ADMIN_EMAIL_VALIDATOR: BuildFormValidator = {
|
||||
VALIDATORS: [Validators.required, Validators.email],
|
||||
MESSAGES: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue