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
@@ -101,7 +102,7 @@ class="mt-1 text-xs italic text-red-600"
101102 ' errors' ,
102103 ],
103104
104- data : function () {
105+ data () {
105106 return {
106107 tags: this .data ? this .data : [],
107108
@@ -110,7 +111,7 @@ class="mt-1 text-xs italic text-red-600"
110111 },
111112
112113 methods: {
113- addTag : function () {
114+ addTag () {
114115 if (this .errors [' temp-' + this .name ]) {
115116 return ;
116117 }
Original file line number Diff line number Diff line change @@ -279,7 +279,8 @@ class="!font-normal"
279279 < x- admin:: form .control - group .controls .tags
280280 name= " reply_to"
281281 class = " w-[calc(100%-62px)]"
282- input- rules= " email|required"
282+ input- rules= " email"
283+ rules= " required"
283284 :: data= " draft.reply_to"
284285 : label= " trans('admin::app.mail.index.mail.to')"
285286 : placeholder= " trans('admin::app.mail.index.mail.enter-emails')"
Original file line number Diff line number Diff line change @@ -357,8 +357,8 @@ class="flex cursor-pointer items-center gap-2 text-brandColor"
357357 < div class = " relative" >
358358 < x- admin:: form .control - group .controls .tags
359359 name= " reply_to"
360- rules= " required"
361360 input- rules= " email"
361+ rules= " required"
362362 :: data= " reply_to"
363363 : label= " trans('admin::app.mail.view.to')"
364364 : placeholder= " trans('admin::app.mail.view.enter-mails')"
You can’t perform that action at this time.
0 commit comments