Skip to content
Snippets Groups Projects

Add validation constraints to user.settings

3 unresolved threads
@@ -3,11 +3,15 @@
@@ -3,11 +3,15 @@
user.settings:
user.settings:
type: config_object
type: config_object
label: 'User settings'
label: 'User settings'
 
constraints:
 
FullyValidatable: ~
mapping:
mapping:
anonymous:
anonymous:
 
requiredKey: false
type: required_label
type: required_label
label: 'Name'
label: 'Name'
verify_mail:
verify_mail:
 
requiredKey: false
type: boolean
type: boolean
label: 'Require email verification when a visitor creates an account'
label: 'Require email verification when a visitor creates an account'
notify:
notify:
@@ -15,39 +19,65 @@ user.settings:
@@ -15,39 +19,65 @@ user.settings:
label: 'Notify user'
label: 'Notify user'
mapping:
mapping:
cancel_confirm:
cancel_confirm:
 
requiredKey: false
type: boolean
type: boolean
label: 'Account cancellation confirmation'
label: 'Account cancellation confirmation'
password_reset:
password_reset:
 
requiredKey: false
type: boolean
type: boolean
label: 'Notify user when password reset'
label: 'Notify user when password reset'
status_activated:
status_activated:
 
requiredKey: false
type: boolean
type: boolean
label: 'Notify user when account is activated'
label: 'Notify user when account is activated'
status_blocked:
status_blocked:
 
requiredKey: false
type: boolean
type: boolean
label: 'Account blocked'
label: 'Account blocked'
status_canceled:
status_canceled:
 
requiredKey: false
type: boolean
type: boolean
label: 'Account canceled'
label: 'Account canceled'
register_admin_created:
register_admin_created:
 
requiredKey: false
type: boolean
type: boolean
label: 'Welcome (new user created by administrator)'
label: 'Welcome (new user created by administrator)'
register_no_approval_required:
register_no_approval_required:
 
requiredKey: false
type: boolean
type: boolean
label: 'Welcome (no approval required)'
label: 'Welcome (no approval required)'
register_pending_approval:
register_pending_approval:
 
requiredKey: false
type: boolean
type: boolean
label: 'Welcome (awaiting approval)'
label: 'Welcome (awaiting approval)'
register:
register:
 
requiredKey: false
type: string
type: string
label: 'Who can register accounts?'
label: 'Who can register accounts?'
 
# @see \Drupal\user\UserInterface
 
constraints:
 
Choice:
 
choices:
 
- 'visitors'
 
- 'admin_only'
 
- 'visitors_admin_approval'
Please register or sign in to reply
cancel_method:
cancel_method:
 
requiredKey: false
type: string
type: string
label: 'When cancelling a user account'
label: 'When cancelling a user account'
 
nullable: true
 
constraints:
 
NotBlank:
 
allowNull: true
Please register or sign in to reply
password_reset_timeout:
password_reset_timeout:
 
requiredKey: false
type: integer
type: integer
label: 'Password reset timeout'
label: 'Password reset timeout'
 
constraints:
 
Range:
 
min: 0
password_strength:
password_strength:
 
requiredKey: false
type: boolean
type: boolean
label: 'Enable password strength indicator'
label: 'Enable password strength indicator'
Loading