File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 6060 password: null ,
6161 togglePassword: false ,
6262 clear: false ,
63- file: false
63+ file: false ,
64+ hasInvalidValue: false
6465 }
6566 }),
6667 provide () {
7980 return this .mdTogglePassword && this .MdField .password
8081 },
8182 hasValue () {
82- return this .stringValue && this .stringValue .length > 0
83+ return ( this .stringValue && this .stringValue .length > 0 ) || this . MdField . hasInvalidValue
8384 },
8485 valueLength () {
8586 if (this .stringValue ) {
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export default {
2424 if ( value . constructor . toString ( ) . match ( / f u n c t i o n ( \w * ) / ) [ 1 ] . toLowerCase ( ) !== 'inputevent' ) {
2525 this . $nextTick ( ( ) => {
2626 this . localValue = value
27+ this . MdField . hasInvalidValue = this . isInvalidValue ( ) ;
2728 } )
2829 }
2930 }
@@ -95,6 +96,9 @@ export default {
9596 }
9697 }
9798 } ,
99+ isInvalidValue ( ) {
100+ return this . $el . validity . badInput
101+ } ,
98102 setFieldValue ( ) {
99103 this . MdField . value = this . model
100104 } ,
You can’t perform that action at this time.
0 commit comments