Преглед на файлове

add contact request name default value

olinox14 преди 1 година
родител
ревизия
41efaa5efa
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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',