File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
packages/Webkul/Admin/src/Resources/views
components/form/control-group/controls Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,9 @@ class="flex flex-wrap items-center gap-1"
1818 v- bind= " $attrs"
1919 >
2020 < li
21- class = " flex items-center gap-1 rounded-md bg-gray-100 dark:bg-gray-950 ltr:pl-2 rtl:pr-2"
2221 v- for = " (tag, index) in tags"
22+ : key= " index"
23+ class = " flex items-center gap-1 rounded-md bg-gray-100 dark:bg-gray-950 ltr:pl-2 rtl:pr-2"
2324 >
2425 < x- admin:: form .control - group .control
2526 type= " hidden"
@@ -40,7 +41,7 @@ class="icon-cross-large cursor-pointer p-0.5 text-xl"
4041 v- slot= " { field, errors }"
4142 : name= " 'temp-' + name"
4243 v- model= " input"
43- : rules= " inputRules"
44+ : rules= " tags.length ? inputRules : [inputRules, rules].filter(Boolean).join('|') "
4445 : label= " label"
4546 >
4647 < input
@@ -61,7 +62,7 @@ class="w-full dark:!bg-gray-900"
6162 v- slot= " { field, errors }"
6263 : name= " name + '[' + 0 +']'"
6364 : value= " input"
64- : rules= " rules "
65+ : rules= " inputRules "
6566 : label= " label"
6667 >
6768 < input
@@ -133,7 +134,7 @@ class="mt-1 text-xs italic text-red-600"
133134 },
134135 },
135136
136- data : function () {
137+ data () {
137138 return {
138139 tags: this .data ? this .data : [],
139140
@@ -142,7 +143,7 @@ class="mt-1 text-xs italic text-red-600"
142143 },
143144
144145 methods: {
145- addTag : function () {
146+ addTag () {
146147 if (this .errors [' temp-' + this .name ]) {
147148 return ;
148149 }
Original file line number Diff line number Diff line change @@ -401,7 +401,8 @@ class="break-words text-slate-900 dark:text-white"
401401 < x- admin:: form .control - group .controls .tags
402402 name= " reply_to"
403403 class = " w-[calc(100%-62px)]"
404- input- rules= " email|required"
404+ input- rules= " email"
405+ rules= " required"
405406 :: data= " draft.reply_to"
406407 : label= " trans('admin::app.mail.index.mail.to')"
407408 : placeholder= " trans('admin::app.mail.index.mail.enter-emails')"
Original file line number Diff line number Diff line change @@ -377,8 +377,8 @@ class="flex cursor-pointer items-center gap-2 text-brandColor"
377377 < div class = " relative" >
378378 < x- admin:: form .control - group .controls .tags
379379 name= " reply_to"
380- rules= " required"
381380 input- rules= " email"
381+ rules= " required"
382382 :: data= " reply_to"
383383 : label= " trans('admin::app.mail.view.to')"
384384 : placeholder= " trans('admin::app.mail.view.enter-mails')"
You can’t perform that action at this time.
0 commit comments