Added gdpr validator

This commit is contained in:
Administrator
2018-05-27 00:30:51 +02:00
parent 328acd2e22
commit 14b6c6af7d

View File

@ -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;
}]
];
}