소스 검색

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',