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, + ) {} }