diff --git a/src/User/Form/RegistrationForm.php b/src/User/Form/RegistrationForm.php index e45bbeb..ae3b5db 100644 --- a/src/User/Form/RegistrationForm.php +++ b/src/User/Form/RegistrationForm.php @@ -68,6 +68,9 @@ class RegistrationForm extends Model // password rules 'passwordRequired' => ['password', 'required', 'skipOnEmpty' => $this->module->generatePasswords], 'passwordLength' => ['password', 'string', 'min' => 6, 'max' => 72], + 'gdprConsent' => ['gdpr_consent', 'required', 'when' => function () { + return $this->module->enableGPDRcompliance; + }] ]; }