| @@ 40-47 (lines=8) @@ | ||
| 37 | public $allowed_ips; |
|
| 38 | public $totp_secret; |
|
| 39 | ||
| 40 | public function rules() |
|
| 41 | { |
|
| 42 | return [ |
|
| 43 | [['username', 'email', 'password', 'first_name', 'last_name'], 'trim'], |
|
| 44 | [['state'], 'trim'], |
|
| 45 | [['email_confirmed', 'allowed_ips', 'totp_secret'], 'trim'], |
|
| 46 | ]; |
|
| 47 | } |
|
| 48 | ||
| 49 | public function init() |
|
| 50 | { |
|
| @@ 27-36 (lines=10) @@ | ||
| 24 | /** |
|
| 25 | * {@inheritdoc} |
|
| 26 | */ |
|
| 27 | public function rules() |
|
| 28 | { |
|
| 29 | return [ |
|
| 30 | [['first_name', 'last_name'], 'trim'], |
|
| 31 | [['first_name', 'last_name'], 'string', 'min' => 2, 'max' => 64], |
|
| 32 | ||
| 33 | ['email', 'trim'], |
|
| 34 | ['email', 'email'], |
|
| 35 | ]; |
|
| 36 | } |
|
| 37 | } |
|
| 38 | ||