[{"data":1,"prerenderedAt":1113},["ShallowReactive",2],{"content-\u002Fdocs\u002Fsubmitting\u002Fserver-side-errors":3},{"id":4,"title":5,"body":6,"description":1092,"extension":1093,"meta":1094,"metaRows":1095,"navigation":157,"path":1108,"seo":1109,"source":1110,"stem":1111,"__hash__":1112},"docs\u002Fdocs\u002Fsubmitting\u002Fserver-side-errors.md","Server-side errors",{"type":7,"value":8,"toc":1082},"minimark",[9,13,25,28,43,47,52,62,210,243,269,277,290,358,479,485,489,507,608,688,694,834,838,844,926,930,933,970,977,981,987,990,1033,1037,1078],[10,11,5],"h1",{"id":12},"server-side-errors",[14,15,16],"blockquote",{},[17,18,19,20,24],"p",{},"A server rejection is just another invalid path. Hand Attaform the errors and they land in the same reactive surface as schema errors: same ",[21,22,23],"code",{},"firstError"," reads, same focus and scroll on submit, same display gating.",[26,27],"docs-meta-table",{},[17,29,30,31,34,35,38,39,42],{},"The demo signs in against a simulated backend. Submit with the wrong password to land an error right under the field; sign in as ",[21,32,33],{},"locked@example.com"," to get a form-level lockout whose structured ",[21,36,37],{},"data"," payload carries the unlock time. Every response routes through a single ",[21,40,41],{},"form.setErrors"," call.",[44,45],"docs-demo",{"label":46,"slug":12},"Server Errors Demo",[48,49,51],"h2",{"id":50},"one-shape-in-one-shape-out","One shape in, one shape out",[17,53,54,55,58,59,61],{},"Attaform reads and writes errors in one shape, ",[21,56,57],{},"ValidationError",", the same record the validator produces. So when your server speaks that shape, there is nothing to translate: hand the array straight to ",[21,60,41],{},".",[63,64,69],"pre",{"className":65,"code":66,"language":67,"meta":68,"style":68},"language-ts shiki shiki-themes github-light github-dark","const onSubmit = form.handleSubmit(async (values) => {\n  form.clearErrors()\n  const response = await api.signIn(values)\n\n  if (!response.ok) {\n    form.setErrors(response.errors)\n    return\n  }\n  \u002F\u002F success path\n})\n","ts","",[21,70,71,117,129,152,159,173,185,191,197,204],{"__ignoreMap":68},[72,73,76,80,84,87,91,95,98,101,104,108,111,114],"span",{"class":74,"line":75},"line",1,[72,77,79],{"class":78},"szBVR","const",[72,81,83],{"class":82},"sj4cs"," onSubmit",[72,85,86],{"class":78}," =",[72,88,90],{"class":89},"sVt8B"," form.",[72,92,94],{"class":93},"sScJk","handleSubmit",[72,96,97],{"class":89},"(",[72,99,100],{"class":78},"async",[72,102,103],{"class":89}," (",[72,105,107],{"class":106},"s4XuR","values",[72,109,110],{"class":89},") ",[72,112,113],{"class":78},"=>",[72,115,116],{"class":89}," {\n",[72,118,120,123,126],{"class":74,"line":119},2,[72,121,122],{"class":89},"  form.",[72,124,125],{"class":93},"clearErrors",[72,127,128],{"class":89},"()\n",[72,130,132,135,138,140,143,146,149],{"class":74,"line":131},3,[72,133,134],{"class":78},"  const",[72,136,137],{"class":82}," response",[72,139,86],{"class":78},[72,141,142],{"class":78}," await",[72,144,145],{"class":89}," api.",[72,147,148],{"class":93},"signIn",[72,150,151],{"class":89},"(values)\n",[72,153,155],{"class":74,"line":154},4,[72,156,158],{"emptyLinePlaceholder":157},true,"\n",[72,160,162,165,167,170],{"class":74,"line":161},5,[72,163,164],{"class":78},"  if",[72,166,103],{"class":89},[72,168,169],{"class":78},"!",[72,171,172],{"class":89},"response.ok) {\n",[72,174,176,179,182],{"class":74,"line":175},6,[72,177,178],{"class":89},"    form.",[72,180,181],{"class":93},"setErrors",[72,183,184],{"class":89},"(response.errors)\n",[72,186,188],{"class":74,"line":187},7,[72,189,190],{"class":78},"    return\n",[72,192,194],{"class":74,"line":193},8,[72,195,196],{"class":89},"  }\n",[72,198,200],{"class":74,"line":199},9,[72,201,203],{"class":202},"sJ8bj","  \u002F\u002F success path\n",[72,205,207],{"class":74,"line":206},10,[72,208,209],{"class":89},"})\n",[17,211,212,215,216,219,220,223,224,223,227,229,230,232,233,235,236,239,240,242],{},[21,213,214],{},"response.errors"," is a ",[21,217,218],{},"ValidationError[]",": each entry carries a ",[21,221,222],{},"message",", an optional ",[21,225,226],{},"path",[21,228,21],{},", and an optional ",[21,231,37],{}," payload. An entry with a ",[21,234,226],{}," lands at that field; an entry with no path lands at the form level, in the global ",[21,237,238],{},"[]"," bucket. ",[21,241,41],{}," stamps the form key on every entry as it lands, so errors stay isolated to this form.",[17,244,245,246,248,249,252,253,256,257,260,261,264,265,268],{},"Returning after ",[21,247,181],{}," is a failed submit, treated exactly like a schema failure: ",[21,250,251],{},"form.meta.submitted"," stays ",[21,254,255],{},"false",", focus pulls to the first error, and your ",[21,258,259],{},"onError"," callback fires with the errors you set. You do not need to throw to signal the rejection, and you do not need to call ",[21,262,263],{},"form.focusFirstError()"," by hand. Reserve a thrown error for the unexpected (a network drop, a 500), which lands on ",[21,266,267],{},"form.meta.submitError"," instead.",[48,270,272,274,275],{"id":271},"seterrors-and-clearerrors",[21,273,181],{}," and ",[21,276,125],{},[17,278,279,281,282,289],{},[21,280,41],{}," owns the manual error layer, the errors you set by hand. Schema errors live in their own layer and merge in on read, so setting manual errors never disturbs validation. Its call forms mirror ",[283,284,286],"a",{"href":285},"\u002Fdocs\u002Fwriting-and-mutating\u002Fset-value",[21,287,288],{},"form.setValue",":",[291,292,293,306],"table",{},[294,295,296],"thead",{},[297,298,299,303],"tr",{},[300,301,302],"th",{},"Call",[300,304,305],{},"Effect",[307,308,309,322,338,348],"tbody",{},[297,310,311,317],{},[312,313,314],"td",{},[21,315,316],{},"setErrors(errors)",[312,318,319,320,61],{},"Replace the whole manual layer with this list. Each entry lands at its own ",[21,321,226],{},[297,323,324,329],{},[312,325,326],{},[21,327,328],{},"setErrors(prev => next)",[312,330,331,332,335,336,61],{},"Functional replace. ",[21,333,334],{},"prev"," is the current manual layer as a ",[21,337,218],{},[297,339,340,345],{},[312,341,342],{},[21,343,344],{},"setErrors(path, errors)",[312,346,347],{},"Scope to one path. Replaces that path's manual errors and stamps the path for you.",[297,349,350,355],{},[312,351,352],{},[21,353,354],{},"clearErrors(path?)",[312,356,357],{},"Clear one path, or everything with no argument, schema and manual errors alike.",[63,359,361],{"className":65,"code":360,"language":67,"meta":68,"style":68},"form.setErrors(response.errors) \u002F\u002F whole layer, each entry at its path\nform.setErrors([{ message: 'Service unavailable, try again shortly.' }]) \u002F\u002F a form-level banner\nform.setErrors('email', [{ message: 'Already registered' }]) \u002F\u002F scoped to one field\nform.setErrors((prev) => [...prev, { path: ['email'], message: 'Also flagged by fraud check' }])\nform.clearErrors('email') \u002F\u002F one field\nform.clearErrors() \u002F\u002F everything\n",[21,362,363,376,395,417,452,467],{"__ignoreMap":68},[72,364,365,368,370,373],{"class":74,"line":75},[72,366,367],{"class":89},"form.",[72,369,181],{"class":93},[72,371,372],{"class":89},"(response.errors) ",[72,374,375],{"class":202},"\u002F\u002F whole layer, each entry at its path\n",[72,377,378,380,382,385,389,392],{"class":74,"line":119},[72,379,367],{"class":89},[72,381,181],{"class":93},[72,383,384],{"class":89},"([{ message: ",[72,386,388],{"class":387},"sZZnC","'Service unavailable, try again shortly.'",[72,390,391],{"class":89}," }]) ",[72,393,394],{"class":202},"\u002F\u002F a form-level banner\n",[72,396,397,399,401,403,406,409,412,414],{"class":74,"line":131},[72,398,367],{"class":89},[72,400,181],{"class":93},[72,402,97],{"class":89},[72,404,405],{"class":387},"'email'",[72,407,408],{"class":89},", [{ message: ",[72,410,411],{"class":387},"'Already registered'",[72,413,391],{"class":89},[72,415,416],{"class":202},"\u002F\u002F scoped to one field\n",[72,418,419,421,423,426,428,430,432,435,438,441,443,446,449],{"class":74,"line":154},[72,420,367],{"class":89},[72,422,181],{"class":93},[72,424,425],{"class":89},"((",[72,427,334],{"class":106},[72,429,110],{"class":89},[72,431,113],{"class":78},[72,433,434],{"class":89}," [",[72,436,437],{"class":78},"...",[72,439,440],{"class":89},"prev, { path: [",[72,442,405],{"class":387},[72,444,445],{"class":89},"], message: ",[72,447,448],{"class":387},"'Also flagged by fraud check'",[72,450,451],{"class":89}," }])\n",[72,453,454,456,458,460,462,464],{"class":74,"line":161},[72,455,367],{"class":89},[72,457,125],{"class":93},[72,459,97],{"class":89},[72,461,405],{"class":387},[72,463,110],{"class":89},[72,465,466],{"class":202},"\u002F\u002F one field\n",[72,468,469,471,473,476],{"class":74,"line":175},[72,470,367],{"class":89},[72,472,125],{"class":93},[72,474,475],{"class":89},"() ",[72,477,478],{"class":202},"\u002F\u002F everything\n",[17,480,481,482,484],{},"A whole-layer ",[21,483,181],{}," is a full replace: any path absent from the new list is cleared. Reach for the scoped form or the functional updater when you want to touch one path and leave the rest alone.",[48,486,488],{"id":487},"the-error-shape","The error shape",[17,490,491,492,494,495,497,498,497,500,502,503,506],{},"What you read back is firm: every ",[21,493,57],{}," has a ",[21,496,222],{},", a ",[21,499,226],{},[21,501,21],{},", and a ",[21,504,505],{},"formKey",". What you pass in is loose, so a server response rarely needs massaging:",[63,508,510],{"className":65,"code":509,"language":67,"meta":68,"style":68},"type ErrorInput =\n  | Error\n  | {\n      message?: string\n      path?: (string | number)[]\n      code?: string\n      data?: Json | null\n      formKey?: FormKey\n    }\n",[21,511,512,523,531,537,548,569,578,593,603],{"__ignoreMap":68},[72,513,514,517,520],{"class":74,"line":75},[72,515,516],{"class":78},"type",[72,518,519],{"class":93}," ErrorInput",[72,521,522],{"class":78}," =\n",[72,524,525,528],{"class":74,"line":119},[72,526,527],{"class":78},"  |",[72,529,530],{"class":93}," Error\n",[72,532,533,535],{"class":74,"line":131},[72,534,527],{"class":78},[72,536,116],{"class":89},[72,538,539,542,545],{"class":74,"line":154},[72,540,541],{"class":106},"      message",[72,543,544],{"class":78},"?:",[72,546,547],{"class":82}," string\n",[72,549,550,553,555,557,560,563,566],{"class":74,"line":161},[72,551,552],{"class":106},"      path",[72,554,544],{"class":78},[72,556,103],{"class":89},[72,558,559],{"class":82},"string",[72,561,562],{"class":78}," |",[72,564,565],{"class":82}," number",[72,567,568],{"class":89},")[]\n",[72,570,571,574,576],{"class":74,"line":175},[72,572,573],{"class":106},"      code",[72,575,544],{"class":78},[72,577,547],{"class":82},[72,579,580,583,585,588,590],{"class":74,"line":187},[72,581,582],{"class":106},"      data",[72,584,544],{"class":78},[72,586,587],{"class":93}," Json",[72,589,562],{"class":78},[72,591,592],{"class":82}," null\n",[72,594,595,598,600],{"class":74,"line":193},[72,596,597],{"class":106},"      formKey",[72,599,544],{"class":78},[72,601,602],{"class":93}," FormKey\n",[72,604,605],{"class":74,"line":199},[72,606,607],{"class":89},"    }\n",[609,610,611,631,645,663,674],"ul",{},[612,613,614,619,620,623,624,626,627,630],"li",{},[615,616,617],"strong",{},[21,618,222],{}," is optional. An ",[21,621,622],{},"Error"," contributes its ",[21,625,222],{},"; a missing or empty message becomes ",[21,628,629],{},"\"Unknown error\""," rather than throwing.",[612,632,633,637,638,640,641,644],{},[615,634,635],{},[21,636,226],{}," defaults to ",[21,639,238],{}," (form level). The scoped ",[21,642,643],{},"setErrors(path, ...)"," form stamps the path for you and ignores any path on the entry.",[612,646,647,637,651,654,655,658,659,662],{},[615,648,649],{},[21,650,21],{},[21,652,653],{},"atta:user-error",". Set your own (",[21,656,657],{},"auth:locked",", ",[21,660,661],{},"api:duplicate",") to branch on it in the UI.",[612,664,665,669,670,673],{},[615,666,667],{},[21,668,37],{}," is an opaque ",[21,671,672],{},"Json"," payload Attaform never inspects. It rides along untouched, so a lockout can carry its unlock time, a challenge its captcha token, a step-up its MFA descriptor.",[612,675,676,680,681,683,684,687],{},[615,677,678],{},[21,679,505],{}," is accepted but ignored: the form always stamps its own. So a ",[21,682,57],{}," you read back (from ",[21,685,686],{},"form.errors()",", or a server that already speaks the shape) is itself valid input, with no mapping required.",[17,689,690,691,693],{},"Reading ",[21,692,37],{}," where you render the error is how the lockout banner in the demo knows when to unlock:",[63,695,697],{"className":65,"code":696,"language":67,"meta":68,"style":68},"const lockout = computed(() => {\n  const locked = (form.errors([]) ?? []).find((e) => e.code === 'auth:locked')\n  const data = locked?.data as { unlocksAt?: string } | null | undefined\n  return data?.unlocksAt ? new Date(data.unlocksAt) : null\n})\n",[21,698,699,718,766,806,830],{"__ignoreMap":68},[72,700,701,703,706,708,711,714,716],{"class":74,"line":75},[72,702,79],{"class":78},[72,704,705],{"class":82}," lockout",[72,707,86],{"class":78},[72,709,710],{"class":93}," computed",[72,712,713],{"class":89},"(() ",[72,715,113],{"class":78},[72,717,116],{"class":89},[72,719,720,722,725,727,730,733,736,739,742,745,747,750,752,754,757,760,763],{"class":74,"line":119},[72,721,134],{"class":78},[72,723,724],{"class":82}," locked",[72,726,86],{"class":78},[72,728,729],{"class":89}," (form.",[72,731,732],{"class":93},"errors",[72,734,735],{"class":89},"([]) ",[72,737,738],{"class":78},"??",[72,740,741],{"class":89}," []).",[72,743,744],{"class":93},"find",[72,746,425],{"class":89},[72,748,749],{"class":106},"e",[72,751,110],{"class":89},[72,753,113],{"class":78},[72,755,756],{"class":89}," e.code ",[72,758,759],{"class":78},"===",[72,761,762],{"class":387}," 'auth:locked'",[72,764,765],{"class":89},")\n",[72,767,768,770,773,775,778,781,784,787,789,792,795,798,801,803],{"class":74,"line":131},[72,769,134],{"class":78},[72,771,772],{"class":82}," data",[72,774,86],{"class":78},[72,776,777],{"class":89}," locked?.data ",[72,779,780],{"class":78},"as",[72,782,783],{"class":89}," { ",[72,785,786],{"class":106},"unlocksAt",[72,788,544],{"class":78},[72,790,791],{"class":82}," string",[72,793,794],{"class":89}," } ",[72,796,797],{"class":78},"|",[72,799,800],{"class":82}," null",[72,802,562],{"class":78},[72,804,805],{"class":82}," undefined\n",[72,807,808,811,814,817,820,823,826,828],{"class":74,"line":154},[72,809,810],{"class":78},"  return",[72,812,813],{"class":89}," data?.unlocksAt ",[72,815,816],{"class":78},"?",[72,818,819],{"class":78}," new",[72,821,822],{"class":93}," Date",[72,824,825],{"class":89},"(data.unlocksAt) ",[72,827,289],{"class":78},[72,829,592],{"class":82},[72,831,832],{"class":74,"line":161},[72,833,209],{"class":89},[48,835,837],{"id":836},"servers-that-speak-a-different-shape","Servers that speak a different shape",[17,839,840,841,843],{},"When a backend returns its own envelope, map it to ",[21,842,57],{}," in one pass at the call site. There is no parser to configure and no shape for Attaform to guess at: you own the one line that knows your server, and everything past it is the canonical contract.",[63,845,847],{"className":65,"code":846,"language":67,"meta":68,"style":68},"const response = await api.signUp(values)\n\nif (!response.ok) {\n  form.setErrors(response.failures.map((f) => ({ path: f.field.split('.'), message: f.detail })))\n  return\n}\n",[21,848,849,866,870,881,916,921],{"__ignoreMap":68},[72,850,851,853,855,857,859,861,864],{"class":74,"line":75},[72,852,79],{"class":78},[72,854,137],{"class":82},[72,856,86],{"class":78},[72,858,142],{"class":78},[72,860,145],{"class":89},[72,862,863],{"class":93},"signUp",[72,865,151],{"class":89},[72,867,868],{"class":74,"line":119},[72,869,158],{"emptyLinePlaceholder":157},[72,871,872,875,877,879],{"class":74,"line":131},[72,873,874],{"class":78},"if",[72,876,103],{"class":89},[72,878,169],{"class":78},[72,880,172],{"class":89},[72,882,883,885,887,890,893,895,898,900,902,905,908,910,913],{"class":74,"line":154},[72,884,122],{"class":89},[72,886,181],{"class":93},[72,888,889],{"class":89},"(response.failures.",[72,891,892],{"class":93},"map",[72,894,425],{"class":89},[72,896,897],{"class":106},"f",[72,899,110],{"class":89},[72,901,113],{"class":78},[72,903,904],{"class":89}," ({ path: f.field.",[72,906,907],{"class":93},"split",[72,909,97],{"class":89},[72,911,912],{"class":387},"'.'",[72,914,915],{"class":89},"), message: f.detail })))\n",[72,917,918],{"class":74,"line":161},[72,919,920],{"class":78},"  return\n",[72,922,923],{"class":74,"line":175},[72,924,925],{"class":89},"}\n",[48,927,929],{"id":928},"the-same-reactive-surface","The same reactive surface",[17,931,932],{},"Once set, server errors are indistinguishable from schema errors at every read:",[609,934,935,944,959,965],{},[612,936,937,940,941,943],{},[21,938,939],{},"form.errors.email"," returns the ",[21,942,218],{}," at that path, server or schema, same shape.",[612,945,946,949,950,953,954,958],{},[21,947,948],{},"form.fields.email.firstError"," returns the first one, and ",[21,951,952],{},"form.fields.email.showErrors"," gates its display through the ",[283,955,957],{"href":956},"\u002Fdocs\u002Fvalidation\u002Fshowing-errors","display-state"," predicate.",[612,960,961,964],{},[21,962,963],{},"form.errors([])"," returns the form-level errors on their own, ideal for a top-of-form banner.",[612,966,967,969],{},[21,968,263],{}," pulls focus to the first server error exactly as it would a schema one.",[17,971,972,973,976],{},"No \"this one came from the server\" branch in your template. The render code reads ",[21,974,975],{},"form.fields.\u003Cpath>.firstError?.message"," the same way for both.",[48,978,980],{"id":979},"clearing-on-a-fresh-round-trip","Clearing on a fresh round-trip",[17,982,983,984,986],{},"A server error stays put until you clear it: editing the field does not drop it on its own, which matches the network round-trip (the value is not re-checked until the next submit). Clearing the whole layer at the top of ",[21,985,94],{}," is the common rhythm, so each submit starts clean.",[17,988,989],{},"For clear-on-edit UX, watch the path and clear it:",[63,991,993],{"className":65,"code":992,"language":67,"meta":68,"style":68},"watch(\n  () => form.values.email,\n  () => form.clearErrors('email')\n)\n",[21,994,995,1003,1013,1029],{"__ignoreMap":68},[72,996,997,1000],{"class":74,"line":75},[72,998,999],{"class":93},"watch",[72,1001,1002],{"class":89},"(\n",[72,1004,1005,1008,1010],{"class":74,"line":119},[72,1006,1007],{"class":89},"  () ",[72,1009,113],{"class":78},[72,1011,1012],{"class":89}," form.values.email,\n",[72,1014,1015,1017,1019,1021,1023,1025,1027],{"class":74,"line":131},[72,1016,1007],{"class":89},[72,1018,113],{"class":78},[72,1020,90],{"class":89},[72,1022,125],{"class":93},[72,1024,97],{"class":89},[72,1026,405],{"class":387},[72,1028,765],{"class":89},[72,1030,1031],{"class":74,"line":154},[72,1032,765],{"class":89},[48,1034,1036],{"id":1035},"where-to-next","Where to next",[609,1038,1039,1047,1054,1062],{},[612,1040,1041,1046],{},[283,1042,1044],{"href":1043},"\u002Fdocs\u002Fsubmitting\u002Fhandle-submit",[21,1045,94],{},": the dispatch surface server errors plug into.",[612,1048,1049,1053],{},[283,1050,1052],{"href":1051},"\u002Fdocs\u002Fsubmitting\u002Ffocus-scroll","Focus & scroll on invalid submit",": the same machinery, applied to server errors after they land.",[612,1055,1056,1061],{},[283,1057,1059],{"href":1058},"\u002Fdocs\u002Freading-the-form\u002Ferrors",[21,1060,732],{},": the reactive read surface for every error, server or schema.",[612,1063,1064,1068,1069,658,1071,1074,1075,1077],{},[283,1065,1067],{"href":1066},"\u002Fdocs\u002Freference\u002Ftypes","Types reference",": ",[21,1070,57],{},[21,1072,1073],{},"ErrorInput",", and ",[21,1076,672],{}," in full.",[1079,1080,1081],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":68,"searchDepth":119,"depth":119,"links":1083},[1084,1085,1087,1088,1089,1090,1091],{"id":50,"depth":119,"text":51},{"id":271,"depth":119,"text":1086},"setErrors and clearErrors",{"id":487,"depth":119,"text":488},{"id":836,"depth":119,"text":837},{"id":928,"depth":119,"text":929},{"id":979,"depth":119,"text":980},{"id":1035,"depth":119,"text":1036},"form.setErrors mounts server errors into the same reactive surface the validator uses. One shape in (an Error or { message?, path?, code?, data? }), one shape out (ValidationError).","md",{},[1096,1099,1102,1105],{"label":1097,"value":1098},"Category","Return methods",{"label":1100,"value":1101,"kind":21},"Set","form.setErrors(errors) · form.setErrors(path, errors)",{"label":1103,"value":1104,"kind":21},"Clear","form.clearErrors(path?)",{"label":1106,"value":1107,"kind":21},"Accepts","Error | { message?, path?, code?, data? }","\u002Fdocs\u002Fsubmitting\u002Fserver-side-errors",{"title":5,"description":1092},null,"docs\u002Fsubmitting\u002Fserver-side-errors","RWpCMHQjrmPv3TXhD9N2tLz-aK_90rR_4W34-5wfZpw",1781745873695]