فهرست منبع

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