Browse Source

make contact request name non required

olinox14 1 year ago
parent
commit
faf3fdafa4
1 changed files with 1 additions and 6 deletions
  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',