浏览代码

fix contact request name default value

olinox14 1 年之前
父节点
当前提交
31655b3145
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/ApiResource/ContactRequest.php

+ 2 - 2
src/ApiResource/ContactRequest.php

@@ -23,8 +23,8 @@ class ContactRequest
     )]
     protected string $email;
 
-    protected string $name = '';
-    
+    protected ?string $name = null;
+
     #[Assert\Length(
         min: 10,
         minMessage: 'Message must be at least {{ limit }} characters long',