```php if (!isset($data['pwd'])) { unset($data['pwd']); return; } if (!isset($data['true_pwd'])) { return $this->fail(message: '请输入确认密码'); } if ($data['pwd'] !== $data['true_pwd']) { return $this->fail(message: '两次输入的密码不一致'); } if ($data['pwd'] === '123456') { return $this->fail(message: '你设置的密码过于简单'); } $data['pwd'] = md5($data['pwd']); ```