From 300bd57abb7ef4197ff6b5385b5a71ff55c23417 Mon Sep 17 00:00:00 2001 From: fr3on Date: Sun, 5 Apr 2026 18:35:11 +0200 Subject: [PATCH] fix(dto): fix inconsistency between docs and code in CreateUserCommand --- dtos/User/CreateUserCommand.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dtos/User/CreateUserCommand.php b/dtos/User/CreateUserCommand.php index af1f84e..d4686b6 100644 --- a/dtos/User/CreateUserCommand.php +++ b/dtos/User/CreateUserCommand.php @@ -5,10 +5,18 @@ namespace Dtos\User; use Quill\Validation\DTO; +use Quill\Attributes\Required; +use Quill\Attributes\Email; +use Quill\Attributes\MinLength; class CreateUserCommand extends DTO { - public string $email; - public string $name; - public string $password; + public function __construct( + #[Required, Email] + public readonly string $email, + #[Required, MinLength(2)] + public readonly string $name, + #[Required, MinLength(8)] + public readonly string $password, + ) {} }