瀏覽代碼

make contact request name non required

olinox14 1 年之前
父節點
當前提交
faf3fdafa4
共有 1 個文件被更改,包括 1 次插入6 次删除
  1. 1 6
      src/ApiResource/ContactRequest.php

+ 1 - 6
src/ApiResource/ContactRequest.php

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