File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 60
60
password: null ,
61
61
togglePassword: false ,
62
62
clear: false ,
63
- file: false
63
+ file: false ,
64
+ hasInvalidValue: false
64
65
}
65
66
}),
66
67
provide () {
79
80
return this .mdTogglePassword && this .MdField .password
80
81
},
81
82
hasValue () {
82
- return this .stringValue && this .stringValue .length > 0
83
+ return ( this .stringValue && this .stringValue .length > 0 ) || this . MdField . hasInvalidValue
83
84
},
84
85
valueLength () {
85
86
if (this .stringValue ) {
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export default {
24
24
if ( value . constructor . toString ( ) . match ( / f u n c t i o n ( \w * ) / ) [ 1 ] . toLowerCase ( ) !== 'inputevent' ) {
25
25
this . $nextTick ( ( ) => {
26
26
this . localValue = value
27
+ this . MdField . hasInvalidValue = this . isInvalidValue ( ) ;
27
28
} )
28
29
}
29
30
}
@@ -95,6 +96,9 @@ export default {
95
96
}
96
97
}
97
98
} ,
99
+ isInvalidValue ( ) {
100
+ return this . $el . validity . badInput
101
+ } ,
98
102
setFieldValue ( ) {
99
103
this . MdField . value = this . model
100
104
} ,
You can’t perform that action at this time.
0 commit comments