File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/connect-react/src/hooks Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -188,11 +188,13 @@ export const FormContextProvider = <T extends ConfigurableProps>({
188188 errs . push ( "not a boolean" ) ;
189189 }
190190 } else if ( prop . type === "string" ) {
191- interface StringProp extends ConfigurableProp {
191+ type StringProp = ConfigurableProp & {
192192 min ?: number ;
193193 max ?: number ;
194194 }
195- const { min = 0 , max } = prop as StringProp ;
195+ const {
196+ min = 1 , max,
197+ } = prop as StringProp ;
196198 if ( typeof value !== "string" ) {
197199 errs . push ( "not a string" ) ;
198200 } else {
@@ -203,12 +205,14 @@ export const FormContextProvider = <T extends ConfigurableProps>({
203205 errs . push ( `string length must not exceed ${ max } characters` ) ;
204206 }
205207 }
206- }
207208 } else if ( prop . type === "app" ) {
208209 const field = fields [ prop . name ]
209210 if ( field ) {
210211 const app = field . extra . app
211- const err = appPropError ( { value, app } )
212+ const err = appPropError ( {
213+ value,
214+ app,
215+ } )
212216 if ( err ) errs . push ( err )
213217 } else {
214218 errs . push ( "field not registered" )
You can’t perform that action at this time.
0 commit comments