Added GDPR rules
This commit is contained in:
@ -73,9 +73,14 @@ class RegistrationForm extends Model
|
|||||||
// password rules
|
// password rules
|
||||||
'passwordRequired' => ['password', 'required', 'skipOnEmpty' => $this->module->generatePasswords],
|
'passwordRequired' => ['password', 'required', 'skipOnEmpty' => $this->module->generatePasswords],
|
||||||
'passwordLength' => ['password', 'string', 'min' => 6, 'max' => 72],
|
'passwordLength' => ['password', 'string', 'min' => 6, 'max' => 72],
|
||||||
'gdprConsent' => ['gdpr_consent', 'required', 'when' => function () {
|
'gdprType' => ['gdpr_consent', 'boolean'],
|
||||||
return $this->module->enableGPDRcompliance;
|
'gdprRequired' => ['gdpr_consent',
|
||||||
}]
|
'compare',
|
||||||
|
'compareValue' => true,
|
||||||
|
'message' => Yii::t('xenon','Your consent is required to register'),
|
||||||
|
'when' => function () {
|
||||||
|
return $this->module->enableGDPRcompliance;
|
||||||
|
}]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user