[{"data":1,"prerenderedAt":674},["Reactive",2],{"content-query-Wxt43jjwWa":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"_empty":6,"title":8,"description":9,"body":10,"_type":669,"_id":670,"_source":671,"_file":672,"_extension":673},"/docs/forms/validation/serialization","validation",false,"","Form Validation - Serialization - Inkline","The serialized form schema is an object that contains the current value of each form input.",{"type":11,"children":12,"toc":666},"root",[13,20,27,48,475,482,492,661],{"type":14,"tag":15,"props":16,"children":19},"element","content-heading",{"subtitle":17,"title":18},"Form Validation","Serialization",[],{"type":14,"tag":21,"props":22,"children":24},"h2",{"id":23},"the-serialized-form-schema-is-an-object-that-contains-the-current-value-of-each-form-input",[25],{"type":26,"value":9},"text",{"type":14,"tag":28,"props":29,"children":30},"p",{},[31,33,39,41,46],{"type":26,"value":32},"The serialized ",{"type":14,"tag":34,"props":35,"children":36},"code-inline",{},[37],{"type":26,"value":38},"form",{"type":26,"value":40}," is returned by the ",{"type":14,"tag":34,"props":42,"children":43},{},[44],{"type":26,"value":45},"useForm()",{"type":26,"value":47}," composable alongside the form schema. The serialized schema is a computed ref and will be kept up-to-date when an input value changes.",{"type":14,"tag":49,"props":50,"children":55},"code",{"className":51,"code":53,"language":54,"meta":7},[52],"language-ts","const { form } = useForm\u003C{\n    field: number;\n    group: {\n        a: string;\n        b: string;\n    };\n    array: string[];\n}>({\n    field: {\n        value: 42\n    },\n    group: {\n        a: {\n            value: 'Group Field A'\n        },\n        b: {\n            value: 'Group Field B'\n        }\n    },\n    array: [\n        {\n            value: 'Item 1'\n        },\n        {\n            value: 'Item 2'\n        }\n    ]\n});\n","ts",[56],{"type":14,"tag":57,"props":58,"children":59},"pre",{},[60],{"type":14,"tag":49,"props":61,"children":62},{"__ignoreMap":7},[63,112,146,168,199,228,237,267,276,285,299,308,317,326,341,350,359,372,381,389,398,407,420,428,436,449,457,466],{"type":14,"tag":64,"props":65,"children":68},"span",{"class":66,"line":67},"line",1,[69,75,81,86,91,96,101,107],{"type":14,"tag":64,"props":70,"children":72},{"class":71},"ct-149352",[73],{"type":26,"value":74},"const",{"type":14,"tag":64,"props":76,"children":78},{"class":77},"ct-553616",[79],{"type":26,"value":80}," { ",{"type":14,"tag":64,"props":82,"children":84},{"class":83},"ct-617022",[85],{"type":26,"value":38},{"type":14,"tag":64,"props":87,"children":88},{"class":77},[89],{"type":26,"value":90}," } ",{"type":14,"tag":64,"props":92,"children":93},{"class":71},[94],{"type":26,"value":95},"=",{"type":14,"tag":64,"props":97,"children":98},{"class":77},[99],{"type":26,"value":100}," ",{"type":14,"tag":64,"props":102,"children":104},{"class":103},"ct-762058",[105],{"type":26,"value":106},"useForm",{"type":14,"tag":64,"props":108,"children":109},{"class":77},[110],{"type":26,"value":111},"\u003C{\n",{"type":14,"tag":64,"props":113,"children":115},{"class":66,"line":114},2,[116,121,127,132,136,141],{"type":14,"tag":64,"props":117,"children":118},{"class":77},[119],{"type":26,"value":120},"    ",{"type":14,"tag":64,"props":122,"children":124},{"class":123},"ct-157101",[125],{"type":26,"value":126},"field",{"type":14,"tag":64,"props":128,"children":129},{"class":71},[130],{"type":26,"value":131},":",{"type":14,"tag":64,"props":133,"children":134},{"class":77},[135],{"type":26,"value":100},{"type":14,"tag":64,"props":137,"children":138},{"class":83},[139],{"type":26,"value":140},"number",{"type":14,"tag":64,"props":142,"children":143},{"class":77},[144],{"type":26,"value":145},";\n",{"type":14,"tag":64,"props":147,"children":149},{"class":66,"line":148},3,[150,154,159,163],{"type":14,"tag":64,"props":151,"children":152},{"class":77},[153],{"type":26,"value":120},{"type":14,"tag":64,"props":155,"children":156},{"class":123},[157],{"type":26,"value":158},"group",{"type":14,"tag":64,"props":160,"children":161},{"class":71},[162],{"type":26,"value":131},{"type":14,"tag":64,"props":164,"children":165},{"class":77},[166],{"type":26,"value":167}," {\n",{"type":14,"tag":64,"props":169,"children":171},{"class":66,"line":170},4,[172,177,182,186,190,195],{"type":14,"tag":64,"props":173,"children":174},{"class":77},[175],{"type":26,"value":176},"        ",{"type":14,"tag":64,"props":178,"children":179},{"class":123},[180],{"type":26,"value":181},"a",{"type":14,"tag":64,"props":183,"children":184},{"class":71},[185],{"type":26,"value":131},{"type":14,"tag":64,"props":187,"children":188},{"class":77},[189],{"type":26,"value":100},{"type":14,"tag":64,"props":191,"children":192},{"class":83},[193],{"type":26,"value":194},"string",{"type":14,"tag":64,"props":196,"children":197},{"class":77},[198],{"type":26,"value":145},{"type":14,"tag":64,"props":200,"children":202},{"class":66,"line":201},5,[203,207,212,216,220,224],{"type":14,"tag":64,"props":204,"children":205},{"class":77},[206],{"type":26,"value":176},{"type":14,"tag":64,"props":208,"children":209},{"class":123},[210],{"type":26,"value":211},"b",{"type":14,"tag":64,"props":213,"children":214},{"class":71},[215],{"type":26,"value":131},{"type":14,"tag":64,"props":217,"children":218},{"class":77},[219],{"type":26,"value":100},{"type":14,"tag":64,"props":221,"children":222},{"class":83},[223],{"type":26,"value":194},{"type":14,"tag":64,"props":225,"children":226},{"class":77},[227],{"type":26,"value":145},{"type":14,"tag":64,"props":229,"children":231},{"class":66,"line":230},6,[232],{"type":14,"tag":64,"props":233,"children":234},{"class":77},[235],{"type":26,"value":236},"    };\n",{"type":14,"tag":64,"props":238,"children":240},{"class":66,"line":239},7,[241,245,250,254,258,262],{"type":14,"tag":64,"props":242,"children":243},{"class":77},[244],{"type":26,"value":120},{"type":14,"tag":64,"props":246,"children":247},{"class":123},[248],{"type":26,"value":249},"array",{"type":14,"tag":64,"props":251,"children":252},{"class":71},[253],{"type":26,"value":131},{"type":14,"tag":64,"props":255,"children":256},{"class":77},[257],{"type":26,"value":100},{"type":14,"tag":64,"props":259,"children":260},{"class":83},[261],{"type":26,"value":194},{"type":14,"tag":64,"props":263,"children":264},{"class":77},[265],{"type":26,"value":266},"[];\n",{"type":14,"tag":64,"props":268,"children":270},{"class":66,"line":269},8,[271],{"type":14,"tag":64,"props":272,"children":273},{"class":77},[274],{"type":26,"value":275},"}>({\n",{"type":14,"tag":64,"props":277,"children":279},{"class":66,"line":278},9,[280],{"type":14,"tag":64,"props":281,"children":282},{"class":77},[283],{"type":26,"value":284},"    field: {\n",{"type":14,"tag":64,"props":286,"children":288},{"class":66,"line":287},10,[289,294],{"type":14,"tag":64,"props":290,"children":291},{"class":77},[292],{"type":26,"value":293},"        value: ",{"type":14,"tag":64,"props":295,"children":296},{"class":83},[297],{"type":26,"value":298},"42\n",{"type":14,"tag":64,"props":300,"children":302},{"class":66,"line":301},11,[303],{"type":14,"tag":64,"props":304,"children":305},{"class":77},[306],{"type":26,"value":307},"    },\n",{"type":14,"tag":64,"props":309,"children":311},{"class":66,"line":310},12,[312],{"type":14,"tag":64,"props":313,"children":314},{"class":77},[315],{"type":26,"value":316},"    group: {\n",{"type":14,"tag":64,"props":318,"children":320},{"class":66,"line":319},13,[321],{"type":14,"tag":64,"props":322,"children":323},{"class":77},[324],{"type":26,"value":325},"        a: {\n",{"type":14,"tag":64,"props":327,"children":329},{"class":66,"line":328},14,[330,335],{"type":14,"tag":64,"props":331,"children":332},{"class":77},[333],{"type":26,"value":334},"            value: ",{"type":14,"tag":64,"props":336,"children":338},{"class":337},"ct-952708",[339],{"type":26,"value":340},"'Group Field A'\n",{"type":14,"tag":64,"props":342,"children":344},{"class":66,"line":343},15,[345],{"type":14,"tag":64,"props":346,"children":347},{"class":77},[348],{"type":26,"value":349},"        },\n",{"type":14,"tag":64,"props":351,"children":353},{"class":66,"line":352},16,[354],{"type":14,"tag":64,"props":355,"children":356},{"class":77},[357],{"type":26,"value":358},"        b: {\n",{"type":14,"tag":64,"props":360,"children":362},{"class":66,"line":361},17,[363,367],{"type":14,"tag":64,"props":364,"children":365},{"class":77},[366],{"type":26,"value":334},{"type":14,"tag":64,"props":368,"children":369},{"class":337},[370],{"type":26,"value":371},"'Group Field B'\n",{"type":14,"tag":64,"props":373,"children":375},{"class":66,"line":374},18,[376],{"type":14,"tag":64,"props":377,"children":378},{"class":77},[379],{"type":26,"value":380},"        }\n",{"type":14,"tag":64,"props":382,"children":384},{"class":66,"line":383},19,[385],{"type":14,"tag":64,"props":386,"children":387},{"class":77},[388],{"type":26,"value":307},{"type":14,"tag":64,"props":390,"children":392},{"class":66,"line":391},20,[393],{"type":14,"tag":64,"props":394,"children":395},{"class":77},[396],{"type":26,"value":397},"    array: [\n",{"type":14,"tag":64,"props":399,"children":401},{"class":66,"line":400},21,[402],{"type":14,"tag":64,"props":403,"children":404},{"class":77},[405],{"type":26,"value":406},"        {\n",{"type":14,"tag":64,"props":408,"children":410},{"class":66,"line":409},22,[411,415],{"type":14,"tag":64,"props":412,"children":413},{"class":77},[414],{"type":26,"value":334},{"type":14,"tag":64,"props":416,"children":417},{"class":337},[418],{"type":26,"value":419},"'Item 1'\n",{"type":14,"tag":64,"props":421,"children":423},{"class":66,"line":422},23,[424],{"type":14,"tag":64,"props":425,"children":426},{"class":77},[427],{"type":26,"value":349},{"type":14,"tag":64,"props":429,"children":431},{"class":66,"line":430},24,[432],{"type":14,"tag":64,"props":433,"children":434},{"class":77},[435],{"type":26,"value":406},{"type":14,"tag":64,"props":437,"children":439},{"class":66,"line":438},25,[440,444],{"type":14,"tag":64,"props":441,"children":442},{"class":77},[443],{"type":26,"value":334},{"type":14,"tag":64,"props":445,"children":446},{"class":337},[447],{"type":26,"value":448},"'Item 2'\n",{"type":14,"tag":64,"props":450,"children":452},{"class":66,"line":451},26,[453],{"type":14,"tag":64,"props":454,"children":455},{"class":77},[456],{"type":26,"value":380},{"type":14,"tag":64,"props":458,"children":460},{"class":66,"line":459},27,[461],{"type":14,"tag":64,"props":462,"children":463},{"class":77},[464],{"type":26,"value":465},"    ]\n",{"type":14,"tag":64,"props":467,"children":469},{"class":66,"line":468},28,[470],{"type":14,"tag":64,"props":471,"children":472},{"class":77},[473],{"type":26,"value":474},"});",{"type":14,"tag":476,"props":477,"children":479},"h5",{"id":478},"serialized-schema",[480],{"type":26,"value":481},"Serialized Schema",{"type":14,"tag":28,"props":483,"children":484},{},[485,486,490],{"type":26,"value":32},{"type":14,"tag":34,"props":487,"children":488},{},[489],{"type":26,"value":38},{"type":26,"value":491}," schema object looks as follows:",{"type":14,"tag":49,"props":493,"children":496},{"className":494,"code":495,"language":54,"meta":7},[52],"{\n    field: 42,\n    group: {\n        a: 'Group Field A',\n        b: 'Group Field B'\n    },\n    array: [\n        'Item 1',\n        'Item 2'\n    ]\n}\n",[497],{"type":14,"tag":57,"props":498,"children":499},{},[500],{"type":14,"tag":49,"props":501,"children":502},{"__ignoreMap":7},[503,511,537,553,577,596,603,619,635,646,653],{"type":14,"tag":64,"props":504,"children":505},{"class":66,"line":67},[506],{"type":14,"tag":64,"props":507,"children":508},{"class":77},[509],{"type":26,"value":510},"{\n",{"type":14,"tag":64,"props":512,"children":513},{"class":66,"line":114},[514,518,522,527,532],{"type":14,"tag":64,"props":515,"children":516},{"class":77},[517],{"type":26,"value":120},{"type":14,"tag":64,"props":519,"children":520},{"class":103},[521],{"type":26,"value":126},{"type":14,"tag":64,"props":523,"children":524},{"class":77},[525],{"type":26,"value":526},": ",{"type":14,"tag":64,"props":528,"children":529},{"class":83},[530],{"type":26,"value":531},"42",{"type":14,"tag":64,"props":533,"children":534},{"class":77},[535],{"type":26,"value":536},",\n",{"type":14,"tag":64,"props":538,"children":539},{"class":66,"line":148},[540,544,548],{"type":14,"tag":64,"props":541,"children":542},{"class":77},[543],{"type":26,"value":120},{"type":14,"tag":64,"props":545,"children":546},{"class":103},[547],{"type":26,"value":158},{"type":14,"tag":64,"props":549,"children":550},{"class":77},[551],{"type":26,"value":552},": {\n",{"type":14,"tag":64,"props":554,"children":555},{"class":66,"line":170},[556,560,564,568,573],{"type":14,"tag":64,"props":557,"children":558},{"class":77},[559],{"type":26,"value":176},{"type":14,"tag":64,"props":561,"children":562},{"class":103},[563],{"type":26,"value":181},{"type":14,"tag":64,"props":565,"children":566},{"class":77},[567],{"type":26,"value":526},{"type":14,"tag":64,"props":569,"children":570},{"class":337},[571],{"type":26,"value":572},"'Group Field A'",{"type":14,"tag":64,"props":574,"children":575},{"class":77},[576],{"type":26,"value":536},{"type":14,"tag":64,"props":578,"children":579},{"class":66,"line":201},[580,584,588,592],{"type":14,"tag":64,"props":581,"children":582},{"class":77},[583],{"type":26,"value":176},{"type":14,"tag":64,"props":585,"children":586},{"class":103},[587],{"type":26,"value":211},{"type":14,"tag":64,"props":589,"children":590},{"class":77},[591],{"type":26,"value":526},{"type":14,"tag":64,"props":593,"children":594},{"class":337},[595],{"type":26,"value":371},{"type":14,"tag":64,"props":597,"children":598},{"class":66,"line":230},[599],{"type":14,"tag":64,"props":600,"children":601},{"class":77},[602],{"type":26,"value":307},{"type":14,"tag":64,"props":604,"children":605},{"class":66,"line":239},[606,610,614],{"type":14,"tag":64,"props":607,"children":608},{"class":77},[609],{"type":26,"value":120},{"type":14,"tag":64,"props":611,"children":612},{"class":103},[613],{"type":26,"value":249},{"type":14,"tag":64,"props":615,"children":616},{"class":77},[617],{"type":26,"value":618},": [\n",{"type":14,"tag":64,"props":620,"children":621},{"class":66,"line":269},[622,626,631],{"type":14,"tag":64,"props":623,"children":624},{"class":77},[625],{"type":26,"value":176},{"type":14,"tag":64,"props":627,"children":628},{"class":337},[629],{"type":26,"value":630},"'Item 1'",{"type":14,"tag":64,"props":632,"children":633},{"class":77},[634],{"type":26,"value":536},{"type":14,"tag":64,"props":636,"children":637},{"class":66,"line":278},[638,642],{"type":14,"tag":64,"props":639,"children":640},{"class":77},[641],{"type":26,"value":176},{"type":14,"tag":64,"props":643,"children":644},{"class":337},[645],{"type":26,"value":448},{"type":14,"tag":64,"props":647,"children":648},{"class":66,"line":287},[649],{"type":14,"tag":64,"props":650,"children":651},{"class":77},[652],{"type":26,"value":465},{"type":14,"tag":64,"props":654,"children":655},{"class":66,"line":301},[656],{"type":14,"tag":64,"props":657,"children":658},{"class":77},[659],{"type":26,"value":660},"}",{"type":14,"tag":662,"children":663},"style",[664],{"type":26,"value":665},".ct-149352{color:#D73A49;}\n.dark-theme .ct-149352{color:#F97583;}\n.ct-553616{color:#24292E;}\n.dark-theme .ct-553616{color:#E1E4E8;}\n.ct-617022{color:#005CC5;}\n.dark-theme .ct-617022{color:#79B8FF;}\n.ct-762058{color:#6F42C1;}\n.dark-theme .ct-762058{color:#B392F0;}\n.ct-157101{color:#E36209;}\n.dark-theme .ct-157101{color:#FFAB70;}\n.ct-952708{color:#032F62;}\n.dark-theme .ct-952708{color:#9ECBFF;}",{"title":7,"searchDepth":114,"depth":114,"links":667},[668],{"id":23,"depth":114,"text":9},"markdown","content:docs:forms:validation:serialization.md","content","docs/forms/validation/serialization.md","md",1794582261078]