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

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