Skip to canvas
Storybook
/
Default
VerticalSkip to canvas
With Style
With On Change
  1. Recently opened
  2. Back to componentsESC
  3. Clear history
Skip to sidebar
NameControl
layout
inputs
inputs : [
    0 : {...} 4 keys
    1 : {...} 5 keys
    2 : {...} 4 keys
    3 : {...} 3 keys
    4 : {...} 3 keys
    5 : {...} 4 keys
    6 : {...} 5 keys
    7 : {...} 4 keys
    8 : {...} 4 keys
    9 : {...} 5 keys
    10 : {...} 5 keys
    11 : {...} 5 keys
]
validationSchema
validationSchema : {
  • type : "object"
  • _typeError : function validate(_ref,cb){let{value:value,path:path="",label:label,options:options,originalValue:originalValue,sync:sync}=_ref,rest=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}(_ref,["value","path","label","options","originalValue","sync"]);const{name:name,test:test,params:params,message:message}=config;let{parent:parent,context:context}=options;function resolve(item){return Reference_Reference.isRef(item)?item.getValue(value,parent,context):item}function createError(overrides={}){const nextParams=mapValues_default()(createValidation_extends({value:value,originalValue:originalValue,label:label,path:overrides.path||path},params,overrides.params),resolve),error=new ValidationError_ValidationError(ValidationError_ValidationError.formatError(overrides.message||message,nextParams),value,nextParams.path,overrides.type||name);return error.params=nextParams,error}let result,ctx=createValidation_extends({path:path,parent:parent,type:name,createError:createError,resolve:resolve,options:options,originalValue:originalValue},rest);if(sync){try{var _ref2;if(result=test.call(ctx,value,ctx),"function"==typeof(null==(_ref2=result)?void 0:_ref2.then))throw new Error(`Validation test of type: "${ctx.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(err){return void cb(err)}ValidationError_ValidationError.isError(result)?cb(result):result?cb(null,result):cb(createError())}else try{Promise.resolve(test.call(ctx,value,ctx)).then((validOrError=>{ValidationError_ValidationError.isError(validOrError)?cb(validOrError):validOrError?cb(null,validOrError):cb(createError())}))}catch(err){cb(err)}}
  • _whitelistError : undefined
  • _blacklistError : undefined
  • _whitelist : {...} 2 keys
    _blacklist : {...} 2 keys
    exclusiveTests : {...} 0 keys
    deps : [...] 0 items
    conditions : [...] 0 items
    tests : [...] 0 items
    transforms : [...] 1 item
    spec : {...} 6 keys
    fields : {...} 5 keys
    _nodes : [...] 5 items
    _excludedEdges : [...] 0 items
  • _sortErrors : (a,b)=>findIndex(keys,a)-findIndex(keys,b
}
initialValues
initialValues : {
  • firstName : "Marcello"
  • myAge : 19
  • myRepeater : [...] 1 item
}
onSubmit-