@@ -579,6 +579,26 @@ const validator = {
579579 }
580580 }
581581 } ,
582+ maxLength : function ( v , units , defaultValueIfNotSupported ) {
583+ v = ( v || '' ) . toString ( ) . trim ( )
584+ if ( v === 'none' ) {
585+ return {
586+ value : v
587+ }
588+ } else {
589+ return validator . length ( v , units , defaultValueIfNotSupported )
590+ }
591+ } ,
592+ minLength : function ( v , units , defaultValueIfNotSupported ) {
593+ v = ( v || '' ) . toString ( ) . trim ( )
594+ if ( v === 'auto' ) {
595+ return {
596+ value : v
597+ }
598+ } else {
599+ return validator . length ( v , units , defaultValueIfNotSupported )
600+ }
601+ } ,
582602 /**
583603 * 颜色值校验, 支持 rgb, rgba, #fff, #ffffff, named-color #f0ff #ff00ff00
584604 * @param v
@@ -2418,6 +2438,16 @@ const validator = {
24182438 )
24192439 }
24202440 }
2441+ } ,
2442+ letterSpacing : function ( v , units , defaultValueIfNotSupported ) {
2443+ v = ( v || '' ) . toString ( ) . trim ( )
2444+ if ( v === 'normal' ) {
2445+ return {
2446+ value : v
2447+ }
2448+ } else {
2449+ return validator . length ( v , units , defaultValueIfNotSupported )
2450+ }
24212451 }
24222452}
24232453
@@ -2517,10 +2547,10 @@ const validatorMap = {
25172547 transitionTimingFunction : validateTimingFunction ,
25182548 width : validator . length ,
25192549 height : validator . length ,
2520- minHeight : validator . length ,
2521- minWidth : validator . length ,
2522- maxHeight : validator . length ,
2523- maxWidth : validator . length ,
2550+ minHeight : validator . minLength ,
2551+ minWidth : validator . minLength ,
2552+ maxHeight : validator . maxLength ,
2553+ maxWidth : validator . maxLength ,
25242554 padding : makeAbbrAttrValidator ( 'arraylength' , [
25252555 'paddingTop' ,
25262556 'paddingRight' ,
@@ -2684,7 +2714,8 @@ const validatorMap = {
26842714 themeThumbColor : makeEnumValidator ( themeColors ) ,
26852715 themeTrackColor : makeEnumValidator ( themeColors ) ,
26862716 themeSelectColor : makeEnumValidator ( themeColors ) ,
2687- themeBlockColor : makeEnumValidator ( themeColors )
2717+ themeBlockColor : makeEnumValidator ( themeColors ) ,
2718+ letterSpacing : validator . letterSpacing
26882719}
26892720
26902721/**
0 commit comments