Browse Source

add contact request name default value

olinox14 1 year ago
parent
commit
41efaa5efa
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/ApiResource/ContactRequest.php

+ 2 - 1
src/ApiResource/ContactRequest.php

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