You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
675B

  1. <?php
  2. namespace App\Http\Controllers\Web\LoginUser;
  3. use App\Http\Controllers\Web\BaseParam;
  4. use App\Http\Controllers\Web\Rule;
  5. use App\Models\User;
  6. use App\Rules\LoginPassword;
  7. /**
  8. * @property string name
  9. * @property string email
  10. * @property string password
  11. * @property string customerCode
  12. */
  13. class CustomerRegisterParam extends BaseParam
  14. {
  15. public function rules(): array
  16. {
  17. return [
  18. User::COL_NAME_NAME => $this->str(),
  19. User::COL_NAME_EMAIL => $this->str([...Rule::email()]),
  20. User::COL_NAME_PASSWORD => $this->str([new LoginPassword()]),
  21. User::COL_NAME_CUSTOMER_CODE => $this->str(),
  22. ];
  23. }
  24. }