File tree Expand file tree Collapse file tree 1 file changed +28
-5
lines changed
Expand file tree Collapse file tree 1 file changed +28
-5
lines changed Original file line number Diff line number Diff line change 1313 defaults : {
1414 group : {
1515 type : 'ui-group' ,
16- validate : function ( v ) {
17- const mode = $ ( '#node-input-mode' ) . val ( ) || this . mode || 'src'
18- return mode === 'tts' ? true : ( v !== null && v !== undefined && v !== '' )
16+ validate : function ( ) {
17+ const tempScope = ( $ ( '#node-input-mode' ) . val ( ) !== undefined ) ? $ ( '#node-input-mode' ) . val ( ) : this . mode || 'src'
18+ const groupVal = ( $ ( '#node-input-group' ) . val ( ) !== undefined ) ? $ ( '#node-input-group' ) . val ( ) : this . group
19+
20+ if ( tempScope !== 'src' ) {
21+ return true
22+ }
23+
24+ if ( tempScope === 'src' ) {
25+ if ( ! ! groupVal && groupVal !== '_ADD_' ) {
26+ return true
27+ }
28+ }
29+ return false
1930 }
31+
2032 } ,
2133 ui : {
2234 type : 'ui-base' ,
2335 validate : function ( v ) {
24- const mode = $ ( '#node-input-mode' ) . val ( ) || this . mode || 'src'
25- return mode === 'tts' ? ( v !== null && v !== undefined && v !== '' ) : true
36+ const tempScope = ( $ ( '#node-input-mode' ) . val ( ) !== undefined ) ? $ ( '#node-input-mode' ) . val ( ) : this . mode || 'src'
37+ const uiVal = ( $ ( '#node-input-ui' ) . val ( ) !== undefined ) ? $ ( '#node-input-ui' ) . val ( ) : this . ui
38+
39+ if ( tempScope !== 'tts' ) {
40+ return true
41+ }
42+
43+ if ( tempScope === 'tts' ) {
44+ if ( ! ! uiVal && uiVal !== '_ADD_' ) {
45+ return true
46+ }
47+ }
48+ return false
2649 }
2750 } ,
2851 name : { value : '' } ,
You can’t perform that action at this time.
0 commit comments