File tree 1 file changed +9
-5
lines changed
packages/Webkul/Admin/src/Resources/views/leads/common
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 14
14
< x- admin:: form .control - group .label class = " required" >
15
15
@lang (' admin::app.leads.common.contact.name' )
16
16
< / x- admin:: form .control - group .label >
17
-
17
+
18
18
< x- admin:: lookup
19
19
:: src= " src"
20
20
name= " person[id]"
21
21
:: params= " params"
22
- rules= " required "
22
+ :: rules= " nameValidationRule "
23
23
:: value= " {id: person.id, name: person.name}"
24
24
: placeholder= " trans('admin::app.leads.common.contact.name')"
25
25
@on - selected= " addPerson"
26
26
: can- add- new = " true"
27
27
/ >
28
-
28
+
29
29
< x- admin:: form .control - group .control
30
30
type= " hidden"
31
31
name= " person[name]"
32
32
v- model= " person.name"
33
33
v- if = " person.name"
34
34
rules= " required"
35
35
/ >
36
-
36
+
37
37
< x- admin:: form .control - group .error control- name= " person[id]" / >
38
38
< / x- admin:: form .control - group>
39
39
44
44
< / x- admin:: form .control - group .label >
45
45
46
46
< x- admin:: attributes .edit .email / >
47
-
47
+
48
48
< v- email- component
49
49
: attribute= " {'code': 'person[emails]', 'name': 'Email'}"
50
50
validations= " required"
121
121
query: this .person [' name' ]
122
122
}
123
123
}
124
+ },
125
+
126
+ nameValidationRule () {
127
+ return this .person .name ? ' ' : ' required' ;
124
128
}
125
129
},
126
130
You can’t perform that action at this time.
0 commit comments