[{"data":1,"prerenderedAt":1766},["ShallowReactive",2],{"fougere:post.list:{}":3,"docs:\u002Fdocs\u002Fserve\u002Fforms":6,"docs-uses":1453,"docs-nav":1628},{"items":4,"hasMore":5},[],false,{"id":7,"title":8,"body":9,"description":1441,"extension":1442,"forms":1443,"kind":1444,"meta":1445,"navigation":96,"path":1446,"seo":1447,"stem":1448,"step":1449,"uses":1450,"__hash__":1452},"docs\u002Fdocs\u002F5.serve\u002F3.forms.md","A form",{"type":10,"value":11,"toc":1434},"minimark",[12,20,478,483,540,543,749,763,781,785,835,972,978,1142,1146,1190,1197,1200,1309,1320,1324,1382,1386,1430],[13,14,15,19],"p",{},[16,17,18],"code",{},"useFormFor(Post)"," gives a page the values, the rules, the submit and the errors of each field, read\nfrom the entity. It renders nothing: the page picks the widgets and lays them out.",[21,22,27],"pre",{"className":23,"code":24,"language":25,"meta":26,"style":26},"language-vue shiki shiki-themes material-theme-lighter fougere-pastel material-theme-palenight","\u003Cscript setup lang=\"ts\">\nimport Post from '@fronds\u002Fblog\u002Fentities\u002FPost.js';\n\nconst { fieldsByName, values, errors, submit, loading, error } = useFormFor(Post);\n\nasync function onSubmit() {\n  const created = await submit();          \u002F\u002F null on validation error\n  if (created) navigateTo(`\u002Fblog\u002Fedit\u002F${created.id}`);\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cform novalidate @submit.prevent=\"onSubmit\">\n    \u003CUFormField label=\"Title\" :error=\"errors.title\">\n      \u003CUInput v-model=\"values.title\" v-bind=\"fieldsByName.title?.attrs\" \u002F>\n    \u003C\u002FUFormField>\n    \u003Cp v-if=\"error\">{{ error.message }}\u003C\u002Fp>          \u003C!-- non-validation failure -->\n    \u003CUButton type=\"submit\" :loading=\"loading\" \u002F>\n  \u003C\u002Fform>\n\u003C\u002Ftemplate>\n","vue","",[16,28,29,65,91,98,159,164,182,208,253,259,269,274,284,310,345,381,391,425,459,469],{"__ignoreMap":26},[30,31,34,38,42,46,49,52,56,60,62],"span",{"class":32,"line":33},"line",1,[30,35,37],{"class":36},"s15xx","\u003C",[30,39,41],{"class":40},"s687E","script",[30,43,45],{"class":44},"s8ClO"," setup",[30,47,48],{"class":44}," lang",[30,50,51],{"class":36},"=",[30,53,55],{"class":54},"sDDC1","\"",[30,57,59],{"class":58},"sN-8n","ts",[30,61,55],{"class":54},[30,63,64],{"class":36},">\n",[30,66,68,72,76,79,82,85,88],{"class":32,"line":67},2,[30,69,71],{"class":70},"sK6XW","import",[30,73,75],{"class":74},"sPEhv"," Post ",[30,77,78],{"class":70},"from",[30,80,81],{"class":54}," '",[30,83,84],{"class":58},"@fronds\u002Fblog\u002Fentities\u002FPost.js",[30,86,87],{"class":54},"'",[30,89,90],{"class":36},";\n",[30,92,94],{"class":32,"line":93},3,[30,95,97],{"emptyLinePlaceholder":96},true,"\n",[30,99,101,105,108,111,114,117,119,122,124,127,129,132,134,137,140,143,147,151,154,157],{"class":32,"line":100},4,[30,102,104],{"class":103},"s76I7","const",[30,106,107],{"class":36}," {",[30,109,110],{"class":74}," fieldsByName",[30,112,113],{"class":36},",",[30,115,116],{"class":74}," values",[30,118,113],{"class":36},[30,120,121],{"class":74}," errors",[30,123,113],{"class":36},[30,125,126],{"class":74}," submit",[30,128,113],{"class":36},[30,130,131],{"class":74}," loading",[30,133,113],{"class":36},[30,135,136],{"class":74}," error ",[30,138,139],{"class":36},"}",[30,141,142],{"class":36}," =",[30,144,146],{"class":145},"s4mR9"," useFormFor",[30,148,150],{"class":149},"srlTG","(",[30,152,153],{"class":74},"Post",[30,155,156],{"class":149},")",[30,158,90],{"class":36},[30,160,162],{"class":32,"line":161},5,[30,163,97],{"emptyLinePlaceholder":96},[30,165,167,170,173,176,179],{"class":32,"line":166},6,[30,168,169],{"class":103},"async",[30,171,172],{"class":103}," function",[30,174,175],{"class":145}," onSubmit",[30,177,178],{"class":36},"()",[30,180,181],{"class":36}," {\n",[30,183,185,188,191,193,196,198,201,204],{"class":32,"line":184},7,[30,186,187],{"class":103},"  const",[30,189,190],{"class":74}," created",[30,192,142],{"class":36},[30,194,195],{"class":70}," await",[30,197,126],{"class":145},[30,199,178],{"class":200},"spAFX",[30,202,203],{"class":36},";",[30,205,207],{"class":206},"skXKP","          \u002F\u002F null on validation error\n",[30,209,211,214,217,220,222,225,227,230,233,236,238,241,245,247,249,251],{"class":32,"line":210},8,[30,212,213],{"class":70},"  if",[30,215,216],{"class":200}," (",[30,218,219],{"class":74},"created",[30,221,156],{"class":200},[30,223,224],{"class":145}," navigateTo",[30,226,150],{"class":200},[30,228,229],{"class":54},"`",[30,231,232],{"class":58},"\u002Fblog\u002Fedit\u002F",[30,234,235],{"class":36},"${",[30,237,219],{"class":74},[30,239,240],{"class":36},".",[30,242,244],{"class":243},"sy9f4","id",[30,246,139],{"class":36},[30,248,229],{"class":54},[30,250,156],{"class":200},[30,252,90],{"class":36},[30,254,256],{"class":32,"line":255},9,[30,257,258],{"class":36},"}\n",[30,260,262,265,267],{"class":32,"line":261},10,[30,263,264],{"class":36},"\u003C\u002F",[30,266,41],{"class":40},[30,268,64],{"class":36},[30,270,272],{"class":32,"line":271},11,[30,273,97],{"emptyLinePlaceholder":96},[30,275,277,279,282],{"class":32,"line":276},12,[30,278,37],{"class":36},[30,280,281],{"class":40},"template",[30,283,64],{"class":36},[30,285,287,290,293,296,299,301,303,306,308],{"class":32,"line":286},13,[30,288,289],{"class":36},"  \u003C",[30,291,292],{"class":40},"form",[30,294,295],{"class":44}," novalidate",[30,297,298],{"class":44}," @submit.prevent",[30,300,51],{"class":36},[30,302,55],{"class":54},[30,304,305],{"class":58},"onSubmit",[30,307,55],{"class":54},[30,309,64],{"class":36},[30,311,313,316,319,322,324,326,329,331,334,336,338,341,343],{"class":32,"line":312},14,[30,314,315],{"class":36},"    \u003C",[30,317,318],{"class":40},"UFormField",[30,320,321],{"class":44}," label",[30,323,51],{"class":36},[30,325,55],{"class":54},[30,327,328],{"class":58},"Title",[30,330,55],{"class":54},[30,332,333],{"class":44}," :error",[30,335,51],{"class":36},[30,337,55],{"class":54},[30,339,340],{"class":58},"errors.title",[30,342,55],{"class":54},[30,344,64],{"class":36},[30,346,348,351,354,357,359,361,364,366,369,371,373,376,378],{"class":32,"line":347},15,[30,349,350],{"class":36},"      \u003C",[30,352,353],{"class":40},"UInput",[30,355,356],{"class":44}," v-model",[30,358,51],{"class":36},[30,360,55],{"class":54},[30,362,363],{"class":58},"values.title",[30,365,55],{"class":54},[30,367,368],{"class":44}," v-bind",[30,370,51],{"class":36},[30,372,55],{"class":54},[30,374,375],{"class":58},"fieldsByName.title?.attrs",[30,377,55],{"class":54},[30,379,380],{"class":36}," \u002F>\n",[30,382,384,387,389],{"class":32,"line":383},16,[30,385,386],{"class":36},"    \u003C\u002F",[30,388,318],{"class":40},[30,390,64],{"class":36},[30,392,394,396,398,401,403,405,408,410,413,416,418,420,422],{"class":32,"line":393},17,[30,395,315],{"class":36},[30,397,13],{"class":40},[30,399,400],{"class":44}," v-if",[30,402,51],{"class":36},[30,404,55],{"class":54},[30,406,407],{"class":58},"error",[30,409,55],{"class":54},[30,411,412],{"class":36},">",[30,414,415],{"class":74},"{{ error.message }}",[30,417,264],{"class":36},[30,419,13],{"class":40},[30,421,412],{"class":36},[30,423,424],{"class":206},"          \u003C!-- non-validation failure -->\n",[30,426,428,430,433,436,438,440,443,445,448,450,452,455,457],{"class":32,"line":427},18,[30,429,315],{"class":36},[30,431,432],{"class":40},"UButton",[30,434,435],{"class":44}," type",[30,437,51],{"class":36},[30,439,55],{"class":54},[30,441,442],{"class":58},"submit",[30,444,55],{"class":54},[30,446,447],{"class":44}," :loading",[30,449,51],{"class":36},[30,451,55],{"class":54},[30,453,454],{"class":58},"loading",[30,456,55],{"class":54},[30,458,380],{"class":36},[30,460,462,465,467],{"class":32,"line":461},19,[30,463,464],{"class":36},"  \u003C\u002F",[30,466,292],{"class":40},[30,468,64],{"class":36},[30,470,472,474,476],{"class":32,"line":471},20,[30,473,264],{"class":36},[30,475,281],{"class":40},[30,477,64],{"class":36},[479,480,482],"h2",{"id":481},"signature","Signature",[21,484,487],{"className":485,"code":486,"language":59,"meta":26,"style":26},"language-ts shiki shiki-themes material-theme-lighter fougere-pastel material-theme-palenight","useFormFor(EntityOrView, options?)\n\u002F\u002F options: {\n\u002F\u002F   op?: string                        command the submit rides — default 'create'\n\u002F\u002F   to?: facade                        where it submits — default the one named like the entity\n\u002F\u002F   initial?: Record\u003Cstring, unknown>  edit mode: the loaded entity\n\u002F\u002F   params?: Record\u003Cstring, string>    designation of the target — edit mode: { id }\n\u002F\u002F }\n",[16,488,489,510,515,520,525,530,535],{"__ignoreMap":26},[30,490,491,494,496,499,501,504,507],{"class":32,"line":33},[30,492,493],{"class":145},"useFormFor",[30,495,150],{"class":149},[30,497,498],{"class":74},"EntityOrView",[30,500,113],{"class":36},[30,502,503],{"class":74}," options",[30,505,506],{"class":36},"?",[30,508,509],{"class":74},")\n",[30,511,512],{"class":32,"line":67},[30,513,514],{"class":206},"\u002F\u002F options: {\n",[30,516,517],{"class":32,"line":93},[30,518,519],{"class":206},"\u002F\u002F   op?: string                        command the submit rides — default 'create'\n",[30,521,522],{"class":32,"line":100},[30,523,524],{"class":206},"\u002F\u002F   to?: facade                        where it submits — default the one named like the entity\n",[30,526,527],{"class":32,"line":161},[30,528,529],{"class":206},"\u002F\u002F   initial?: Record\u003Cstring, unknown>  edit mode: the loaded entity\n",[30,531,532],{"class":32,"line":166},[30,533,534],{"class":206},"\u002F\u002F   params?: Record\u003Cstring, string>    designation of the target — edit mode: { id }\n",[30,536,537],{"class":32,"line":184},[30,538,539],{"class":206},"\u002F\u002F }\n",[13,541,542],{},"Returns:",[544,545,546,562],"table",{},[547,548,549],"thead",{},[550,551,552,556,559],"tr",{},[553,554,555],"th",{},"Key",[553,557,558],{},"Type",[553,560,561],{},"Notes",[563,564,565,585,600,619,634,648,661,679,694,716,733],"tbody",{},[550,566,567,573,578],{},[568,569,570],"td",{},[16,571,572],{},"fields",[568,574,575],{},[16,576,577],{},"FormField[]",[568,579,580,581,584],{},"the fields a client may write — ",[16,582,583],{},"readOnly"," ones are left out",[550,586,587,592,597],{},[568,588,589],{},[16,590,591],{},"fieldsByName",[568,593,594],{},[16,595,596],{},"Record\u003Cstring, FormField>",[568,598,599],{},"the same fields, for a form laid out by hand",[550,601,602,607,613],{},[568,603,604],{},[16,605,606],{},"values",[568,608,609,612],{},[16,610,611],{},"reactive"," row, every field optional",[568,614,615,618],{},[16,616,617],{},"initial"," when editing, the field's declared default when creating",[550,620,621,626,631],{},[568,622,623],{},[16,624,625],{},"errors",[568,627,628,630],{},[16,629,611],{}," record",[568,632,633],{},"field name → message, keyed by the entity's fields",[550,635,636,640,645],{},[568,637,638],{},[16,639,442],{},[568,641,642],{},[16,643,644],{},"() => Promise\u003CRow | null>",[568,646,647],{},"see cycle below",[550,649,650,654,659],{},[568,651,652],{},[16,653,454],{},[568,655,656],{},[16,657,658],{},"Ref\u003Cboolean>",[568,660],{},[550,662,663,667,672],{},[568,664,665],{},[16,666,407],{},[568,668,669],{},[16,670,671],{},"Ref\u003CFougereError | null>",[568,673,674,678],{},[675,676,677],"strong",{},"non-validation"," failure (conflict, dead host)",[550,680,681,686,691],{},[568,682,683],{},[16,684,685],{},"valid",[568,687,688],{},[16,689,690],{},"ComputedRef\u003Cboolean>",[568,692,693],{},"no current field errors",[550,695,696,701,705],{},[568,697,698],{},[16,699,700],{},"choices",[568,702,703,630],{},[16,704,611],{},[568,706,707,708,711,712,715],{},"per ",[16,709,710],{},"reference"," field, the ",[16,713,714],{},"{ value, label }"," rows it offers",[550,717,718,723,728],{},[568,719,720],{},[16,721,722],{},"search",[568,724,725],{},[16,726,727],{},"(name, text) => Promise\u003Cvoid>",[568,729,730,731],{},"reloads one field's ",[16,732,700],{},[550,734,735,740,744],{},[568,736,737],{},[16,738,739],{},"searchable",[568,741,742,630],{},[16,743,611],{},[568,745,707,746,748],{},[16,747,710],{}," field, whether its target holds more rows than one load offers",[13,750,751,754,755,758,759,762],{},[16,752,753],{},"novalidate"," keeps the attributes and leaves the verdict to the form: ",[16,756,757],{},"required"," is still\nannounced, ",[16,760,761],{},"maxLength"," still stops the typing, and a refusal lands under its field in the same\nwords and the same place whether the browser's copy of the rules or the server refused it.",[13,764,765,766,769,770,773,774,777,778,780],{},"A control left empty, or never touched, is ",[16,767,768],{},"null"," for a field that admits it — ",[16,771,772],{},"nullable(ref(Author))",",\n",[16,775,776],{},"optional(text())"," — and absent for any other. No choice is the answer there, so such a field is not\n",[16,779,757],{}," and its empty option can be taken.",[479,782,784],{"id":783},"a-reference-is-a-choice","A reference is a choice",[13,786,787,788,791,792,794,795,798,799,802,803,806,807,810,811,814,815,818,819,822,823,826,827,830,831,834],{},"A ",[16,789,790],{},"ref(Author)"," field is a ",[16,793,710],{}," control, and ",[16,796,797],{},"field.reference"," says what it points at:\n",[16,800,801],{},"{ to: 'author', key: 'id', label: 'name' }",". The label is the first ",[16,804,805],{},"text()"," the target shows —\nnever a ",[16,808,809],{},"writeOnly"," one — and its key when it shows none. The form loads the first\ntwenty rows of the target once mounted, into ",[16,812,813],{},"choices.authorId",", and ",[16,816,817],{},"search('authorId', 'ali')","\nreloads the ones whose label contains the text — a ",[16,820,821],{},"list"," with ",[16,824,825],{},"limit"," and ",[16,828,829],{},"where",", nothing new\non the server. Which widget shows them is the page's: a ",[16,832,833],{},"\u003Cselect>",", or a searchable menu.",[21,836,838],{"className":23,"code":837,"language":25,"meta":26,"style":26},"\u003CUSelectMenu\n  v-model=\"values.authorId\" :items=\"choices.authorId ?? []\" value-key=\"value\" label-key=\"label\"\n  ignore-filter @update:search-term=\"(text) => search('authorId', text)\"\n\u002F>\n",[16,839,840,847,914,967],{"__ignoreMap":26},[30,841,842,844],{"class":32,"line":33},[30,843,37],{"class":36},[30,845,846],{"class":40},"USelectMenu\n",[30,848,849,852,854,856,858,860,863,865,868,871,873,875,877,879,881,884,887,889,892,894,896,899,901,904,906,908,911],{"class":32,"line":67},[30,850,851],{"class":44},"  v-model",[30,853,51],{"class":36},[30,855,55],{"class":54},[30,857,606],{"class":74},[30,859,240],{"class":36},[30,861,862],{"class":243},"authorId",[30,864,55],{"class":54},[30,866,867],{"class":36}," :",[30,869,870],{"class":44},"items",[30,872,51],{"class":36},[30,874,55],{"class":54},[30,876,700],{"class":74},[30,878,240],{"class":36},[30,880,862],{"class":243},[30,882,883],{"class":36}," ??",[30,885,886],{"class":149}," []",[30,888,55],{"class":54},[30,890,891],{"class":44}," value-key",[30,893,51],{"class":36},[30,895,55],{"class":54},[30,897,898],{"class":58},"value",[30,900,55],{"class":54},[30,902,903],{"class":44}," label-key",[30,905,51],{"class":36},[30,907,55],{"class":54},[30,909,910],{"class":58},"label",[30,912,913],{"class":54},"\"\n",[30,915,916,919,922,925,928,931,933,935,937,941,943,947,950,952,954,956,958,960,963,965],{"class":32,"line":93},[30,917,918],{"class":44},"  ignore-filter",[30,920,921],{"class":36}," @",[30,923,924],{"class":44},"update",[30,926,927],{"class":36},":",[30,929,930],{"class":44},"search-term",[30,932,51],{"class":36},[30,934,55],{"class":54},[30,936,150],{"class":36},[30,938,940],{"class":939},"shDUQ","text",[30,942,156],{"class":36},[30,944,946],{"class":945},"scTuO"," =>",[30,948,949],{"class":145}," search",[30,951,150],{"class":149},[30,953,87],{"class":54},[30,955,862],{"class":58},[30,957,87],{"class":54},[30,959,113],{"class":36},[30,961,962],{"class":74}," text",[30,964,156],{"class":149},[30,966,913],{"class":54},[30,968,969],{"class":32,"line":100},[30,970,971],{"class":74},"\u002F>\n",[13,973,974,975,927],{},"Edit mode composes with a query — the facade is aliased because the row is already ",[16,976,977],{},"post",[21,979,981],{"className":485,"code":980,"language":59,"meta":26,"style":26},"import { post as postFacade } from '@fronds\u002Ffacade';\n\nconst { data: post } = await useQuery(postFacade, 'findById', { params: { id } });\nconst form = useFormFor(Post, { op: 'update', params: { id }, initial: post.value ?? undefined });\n",[16,982,983,1013,1017,1077],{"__ignoreMap":26},[30,984,985,987,989,992,995,998,1001,1004,1006,1009,1011],{"class":32,"line":33},[30,986,71],{"class":70},[30,988,107],{"class":36},[30,990,991],{"class":74}," post",[30,993,994],{"class":70}," as",[30,996,997],{"class":74}," postFacade",[30,999,1000],{"class":36}," }",[30,1002,1003],{"class":70}," from",[30,1005,81],{"class":54},[30,1007,1008],{"class":58},"@fronds\u002Ffacade",[30,1010,87],{"class":54},[30,1012,90],{"class":36},[30,1014,1015],{"class":32,"line":67},[30,1016,97],{"emptyLinePlaceholder":96},[30,1018,1019,1021,1023,1027,1029,1032,1034,1036,1038,1041,1043,1046,1048,1050,1053,1055,1057,1059,1062,1064,1066,1069,1071,1073,1075],{"class":32,"line":93},[30,1020,104],{"class":103},[30,1022,107],{"class":36},[30,1024,1026],{"class":1025},"sHtqg"," data",[30,1028,927],{"class":36},[30,1030,1031],{"class":74}," post ",[30,1033,139],{"class":36},[30,1035,142],{"class":36},[30,1037,195],{"class":70},[30,1039,1040],{"class":145}," useQuery",[30,1042,150],{"class":149},[30,1044,1045],{"class":74},"postFacade",[30,1047,113],{"class":36},[30,1049,81],{"class":54},[30,1051,1052],{"class":58},"findById",[30,1054,87],{"class":54},[30,1056,113],{"class":36},[30,1058,107],{"class":36},[30,1060,1061],{"class":1025}," params",[30,1063,927],{"class":36},[30,1065,107],{"class":36},[30,1067,1068],{"class":74}," id ",[30,1070,139],{"class":36},[30,1072,1000],{"class":36},[30,1074,156],{"class":149},[30,1076,90],{"class":36},[30,1078,1079,1081,1084,1086,1088,1090,1092,1094,1096,1099,1101,1103,1105,1107,1109,1111,1113,1115,1117,1120,1123,1125,1127,1129,1131,1133,1136,1138,1140],{"class":32,"line":100},[30,1080,104],{"class":103},[30,1082,1083],{"class":74}," form ",[30,1085,51],{"class":36},[30,1087,146],{"class":145},[30,1089,150],{"class":149},[30,1091,153],{"class":74},[30,1093,113],{"class":36},[30,1095,107],{"class":36},[30,1097,1098],{"class":1025}," op",[30,1100,927],{"class":36},[30,1102,81],{"class":54},[30,1104,924],{"class":58},[30,1106,87],{"class":54},[30,1108,113],{"class":36},[30,1110,1061],{"class":1025},[30,1112,927],{"class":36},[30,1114,107],{"class":36},[30,1116,1068],{"class":74},[30,1118,1119],{"class":36},"},",[30,1121,1122],{"class":1025}," initial",[30,1124,927],{"class":36},[30,1126,991],{"class":74},[30,1128,240],{"class":36},[30,1130,898],{"class":243},[30,1132,883],{"class":36},[30,1134,1135],{"class":54}," undefined",[30,1137,1000],{"class":36},[30,1139,156],{"class":149},[30,1141,90],{"class":36},[479,1143,1145],{"id":1144},"the-browser-validates-first-and-for-free","The browser validates first, and for free",[13,1147,1148,1151,1152,1155,1156,1155,1158,1155,1161,1155,1163,1155,1166,1155,1169,1172,1173,1176,1177,1179,1180,1155,1182,1185,1186,1189],{},[16,1149,1150],{},"field.attrs"," is the part of the declaration a browser already enforces, under the names\nit knows: ",[16,1153,1154],{},"type",", ",[16,1157,757],{},[16,1159,1160],{},"minLength",[16,1162,761],{},[16,1164,1165],{},"min",[16,1167,1168],{},"max",[16,1170,1171],{},"pattern",". Spread it\nand the page states no rule of its own — ",[16,1174,1175],{},"text({ min: 1, max: 200 })"," becomes\n",[16,1178,1160],{},"\u002F",[16,1181,761],{},[16,1183,1184],{},"email()"," becomes ",[16,1187,1188],{},"type=\"email\"",", checked live as one types, with\nno JavaScript at all.",[13,1191,1192,1193,1196],{},"It is not a second rule: the validator reads the same shape. A form that ignores ",[16,1194,1195],{},"attrs"," gets the\nsame verdict, only later — and a screen reader never gets it.",[13,1198,1199],{},"Four attributes are left out on purpose, where HTML would mean something the entity does not say:",[544,1201,1202,1215],{},[547,1203,1204],{},[550,1205,1206,1209,1212],{},[553,1207,1208],{},"Field",[553,1210,1211],{},"Absent",[553,1213,1214],{},"Because",[563,1216,1217,1242,1264,1286],{},[550,1218,1219,1223,1227],{},[568,1220,1221],{},[16,1222,805],{},[568,1224,1225],{},[16,1226,1154],{},[568,1228,1229,1231,1232,1235,1236,1239,1240],{},[16,1230,940],{}," is what an ",[16,1233,1234],{},"\u003Cinput>"," already is, and a page may lay the field out as a ",[16,1237,1238],{},"\u003Ctextarea>",", which has no ",[16,1241,1154],{},[550,1243,1244,1249,1253],{},[568,1245,1246],{},[16,1247,1248],{},"date()",[568,1250,1251],{},[16,1252,1154],{},[568,1254,1255,1256,1259,1260,1263],{},"neither ",[16,1257,1258],{},"date"," nor ",[16,1261,1262],{},"datetime-local"," produces the RFC 3339 string the validator expects",[550,1265,1266,1271,1275],{},[568,1267,1268],{},[16,1269,1270],{},"bool()",[568,1272,1273],{},[16,1274,757],{},[568,1276,1277,1278,1281,1282,1285],{},"on a checkbox it means \"must be ",[675,1279,1280],{},"checked","\"; the shape says the value must be supplied, and ",[16,1283,1284],{},"false"," is one",[550,1287,1288,1295,1299],{},[568,1289,1290,1155,1293],{},[16,1291,1292],{},"oneOf(…)",[16,1294,1270],{},[568,1296,1297],{},[16,1298,1154],{},[568,1300,1301,1302,1304,1305,1308],{},"these are not ",[16,1303,1234],{},"s — ",[16,1306,1307],{},"field.control"," says which widget, the page renders it",[13,1310,1311,1312,1315,1316,1319],{},"What HTML cannot say at all — a cross-field rule, ",[16,1313,1314],{},"format: 'uuid'",", a ",[16,1317,1318],{},"oneOf"," outside a\nselect — is caught by the pass below.",[479,1321,1323],{"id":1322},"the-submit-cycle","The submit cycle",[1325,1326,1327,1347,1353,1366],"ol",{},[1328,1329,1330,1333,1334,1337,1338,1340,1341,1344,1345,240],"li",{},[675,1331,1332],{},"In the browser"," — ",[16,1335,1336],{},"Entity.validate(payload)"," runs with the same rules as the server. A refusal\nlands in ",[16,1339,625],{}," with no request sent, and ",[16,1342,1343],{},"submit()"," answers ",[16,1346,768],{},[1328,1348,1349,1352],{},[675,1350,1351],{},"The command"," — the payload is sent through the facade named like the entity. On success, the\nmounted queries on that facade read again.",[1328,1354,1355,1358,1359,1362,1363,1365],{},[675,1356,1357],{},"On the server"," — a ",[16,1360,1361],{},"VALIDATION_FAILED"," that comes back lands in ",[16,1364,625],{}," by field, in the same\nwords as a local one.",[1328,1367,1368,1369,1155,1372,1375,1376,1378,1379,1381],{},"Other errors (",[16,1370,1371],{},"CONFLICT",[16,1373,1374],{},"SERVICE_UNAVAILABLE","…) are placed in ",[16,1377,407],{},". Every refusal answers\n",[16,1380,768],{},", and none is thrown.",[479,1383,1385],{"id":1384},"what-the-form-will-not-do","What the form will not do",[1387,1388,1389,1395,1404,1410],"ul",{},[1328,1390,1391,1394],{},[675,1392,1393],{},"Render components"," — widgets and layout remain in the application.",[1328,1396,1397,1403],{},[675,1398,1399,1400,1402],{},"Show ",[16,1401,583],{}," fields"," — a status is shown from the loaded row, as a badge, not as an input.",[1328,1405,1406,1409],{},[675,1407,1408],{},"Write labels"," — they stay in your translations, keyed by entity and field name.",[1328,1411,1412,1415,1416,1418,1419,1421,1422,1425,1426,1429],{},[675,1413,1414],{},"Invent a value."," ",[16,1417,606],{}," starts from ",[16,1420,617],{}," when editing and from the field's default when\ncreating — ",[16,1423,1424],{},"oneOf('public', 'private', { default: 'public' })"," opens on ",[16,1427,1428],{},"public",". A placeholder or a\nsuggestion is the page's.",[1431,1432,1433],"style",{},"html pre.shiki code .s15xx, html code.shiki .s15xx{--shiki-light:#39ADB5;--shiki-default:#A3B0A5;--shiki-dark:#89DDFF}html pre.shiki code .s687E, html code.shiki .s687E{--shiki-light:#E53935;--shiki-default:#8FCF86;--shiki-dark:#F07178}html pre.shiki code .s8ClO, html code.shiki .s8ClO{--shiki-light:#9C3EDA;--shiki-default:#93CFC0;--shiki-dark:#C792EA}html pre.shiki code .sDDC1, html code.shiki .sDDC1{--shiki-light:#39ADB5;--shiki-default:#EE9F6B;--shiki-dark:#89DDFF}html pre.shiki code .sN-8n, html code.shiki .sN-8n{--shiki-light:#91B859;--shiki-default:#EE9F6B;--shiki-dark:#C3E88D}html pre.shiki code .sK6XW, html code.shiki .sK6XW{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#8FCF86;--shiki-default-font-style:inherit;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sPEhv, html code.shiki .sPEhv{--shiki-light:#90A4AE;--shiki-default:#DDE5DA;--shiki-dark:#BABED8}html pre.shiki code .s76I7, html code.shiki .s76I7{--shiki-light:#9C3EDA;--shiki-default:#8FCF86;--shiki-dark:#C792EA}html pre.shiki code .s4mR9, html code.shiki .s4mR9{--shiki-light:#6182B8;--shiki-default:#C9B6EA;--shiki-dark:#82AAFF}html pre.shiki code .srlTG, html code.shiki .srlTG{--shiki-light:#90A4AE;--shiki-default:#A3B0A5;--shiki-dark:#BABED8}html pre.shiki code .spAFX, html code.shiki .spAFX{--shiki-light:#E53935;--shiki-default:#A3B0A5;--shiki-dark:#F07178}html pre.shiki code .skXKP, html code.shiki .skXKP{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#7D8C80;--shiki-default-font-style:inherit;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sy9f4, html code.shiki .sy9f4{--shiki-light:#90A4AE;--shiki-default:#93CFC0;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}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 .shDUQ, html code.shiki .shDUQ{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#DDE5DA;--shiki-default-font-style:inherit;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .scTuO, html code.shiki .scTuO{--shiki-light:#9C3EDA;--shiki-default:#A3B0A5;--shiki-dark:#C792EA}html pre.shiki code .sHtqg, html code.shiki .sHtqg{--shiki-light:#E53935;--shiki-default:#93CFC0;--shiki-dark:#F07178}",{"title":26,"searchDepth":67,"depth":67,"links":1435},[1436,1437,1438,1439,1440],{"id":481,"depth":67,"text":482},{"id":783,"depth":67,"text":784},{"id":1144,"depth":67,"text":1145},{"id":1322,"depth":67,"text":1323},{"id":1384,"depth":67,"text":1385},"A form that refuses in the browser what the server refuses.","md",[493],"task",{},"\u002Fdocs\u002Fserve\u002Fforms",{"title":8,"description":1441},"docs\u002F5.serve\u002F3.forms",null,[1451],"entity","0PcAK2ePbORdyNI_X0__4ZE0YS4B4n9WGADDSpSurXk",[1454,1457,1460,1463,1466,1469,1472,1475,1478,1484,1490,1494,1498,1502,1506,1510,1514,1519,1523,1527,1532,1536,1541,1543,1547,1551,1555,1559,1563,1567,1571,1575,1579,1583,1587,1591,1595,1598,1601,1604,1607,1610,1613,1616,1619,1622,1625],{"path":1455,"title":1456,"uses":1449},"\u002Fdocs\u002Fconcepts\u002Fentity","Entity",{"path":1458,"title":1459,"uses":1449},"\u002Fdocs\u002Fconcepts\u002Fhandler","Handler",{"path":1461,"title":1462,"uses":1449},"\u002Fdocs\u002Fconcepts\u002Frepository","Repository",{"path":1464,"title":1465,"uses":1449},"\u002Fdocs\u002Fconcepts\u002Ffrond","Frond",{"path":1467,"title":1468,"uses":1449},"\u002Fdocs\u002Fconcepts\u002Ffacade","Facade",{"path":1470,"title":1471,"uses":1449},"\u002Fdocs\u002Fconcepts\u002Ffact","Fact",{"path":1473,"title":1474,"uses":1449},"\u002Fdocs\u002Fconcepts\u002Fport","Port",{"path":1476,"title":1477,"uses":1449},"\u002Fdocs\u002Fconcepts\u002Fconfiguration","Configuration",{"path":1479,"title":1480,"uses":1481},"\u002Fdocs\u002Faccess\u002Fauthentication","Authentication",[1482,1483],"port","frond",{"path":1485,"title":1486,"uses":1487},"\u002Fdocs\u002Faccess\u002Fstate","Keep a caller's state",[1488,1489],"configuration","handler",{"path":1491,"title":1492,"uses":1493},"\u002Fdocs\u002Fdata\u002Fsql","SQLite or Postgres",[1451,1488],{"path":1495,"title":1496,"uses":1497},"\u002Fdocs\u002Fdata\u002Fseveral-databases","Several databases",[1488,1451],{"path":1499,"title":1500,"uses":1501},"\u002Fdocs\u002Fdata\u002Fcomputed-field","A computed field",[1451,1482],{"path":1503,"title":1504,"uses":1505},"\u002Fdocs\u002Fdata\u002Fevolve","Evolve a schema",[1451],{"path":1507,"title":1508,"uses":1509},"\u002Fdocs\u002Fdata\u002Fseeds","Seed data",[1451],{"path":1511,"title":1512,"uses":1513},"\u002Fdocs\u002Fdata\u002Fvalues","Read settings and secrets",[1451,1488],{"path":1515,"title":1516,"uses":1517},"\u002Fdocs\u002Fdata\u002Fmirror","Mirror a source you cannot query",[1518],"repository",{"path":1520,"title":1521,"uses":1522},"\u002Fdocs\u002Fdata\u002Ftogether","Two writes as one",[1518],{"path":1524,"title":1525,"uses":1526},"\u002Fdocs\u002Fbehaviour\u002Faround-every-call","Around every call",[1482,1483],{"path":1528,"title":1529,"uses":1530},"\u002Fdocs\u002Fbehaviour\u002Ffinish-a-fact","Finish a fact",[1531],"fact",{"path":1533,"title":1534,"uses":1535},"\u002Fdocs\u002Fserve\u002Frest-graphql","REST, OpenAPI, GraphQL",[1489,1488],{"path":1537,"title":1538,"uses":1539},"\u002Fdocs\u002Fserve\u002Fpages","Pages: queries and commands",[1489,1540],"facade",{"path":1446,"title":8,"uses":1542},[1451],{"path":1544,"title":1545,"uses":1546},"\u002Fdocs\u002Fserve\u002Fadmin","An admin panel",[1489],{"path":1548,"title":1549,"uses":1550},"\u002Fdocs\u002Frun\u002Fdeploy","Deploy a split",[1488,1483],{"path":1552,"title":1553,"uses":1554},"\u002Fdocs\u002Frun\u002Fsecure","Secure calls between processes",[1488,1483],{"path":1556,"title":1557,"uses":1558},"\u002Fdocs\u002Frun\u002Flifecycle","Reload and shut down",[1488],{"path":1560,"title":1561,"uses":1562},"\u002Fdocs\u002Frun\u002Fobserve","Observe",[1488,1489],{"path":1564,"title":1565,"uses":1566},"\u002Fdocs\u002Frun\u002Fdev-panel","The dev panel",[1489],{"path":1568,"title":1569,"uses":1570},"\u002Fdocs\u002Frun\u002Ftest","Test",[1451,1482],{"path":1572,"title":1573,"uses":1574},"\u002Fdocs\u002Fadopt\u002Fnew-project","Start a project",[1483,1488],{"path":1576,"title":1577,"uses":1578},"\u002Fdocs\u002Fadopt\u002Fexisting-app","Add Fougere to an existing app",[1483,1488],{"path":1580,"title":1581,"uses":1582},"\u002Fdocs\u002Fadopt\u002Fbring-your-schema","Bring your schema",[1451],{"path":1584,"title":1585,"uses":1586},"\u002Fdocs\u002Fadopt\u002Fhosts","Pick a host",[1488],{"path":1588,"title":1589,"uses":1590},"\u002Fdocs\u002Fadopt\u002Fanother-repository","A frond from another repository",[1540,1483],{"path":1592,"title":1593,"uses":1594},"\u002Fdocs\u002Fadopt\u002Fdemos","Demos",[],{"path":1596,"title":1597,"uses":1449},"\u002Fdocs\u002Fextending\u002Fscan","How the scan reads a project",{"path":1599,"title":1600,"uses":1449},"\u002Fdocs\u002Fextending\u002Fwithout-compiler","Boot without the compiler",{"path":1602,"title":1603,"uses":1449},"\u002Fdocs\u002Fextending\u002Fboot","The boot, step by step",{"path":1605,"title":1606,"uses":1449},"\u002Fdocs\u002Fextending\u002Fcard-and-wire","The card and the wire",{"path":1608,"title":1609,"uses":1449},"\u002Fdocs\u002Fextending\u002Fextension-points","Registries and extension points",{"path":1611,"title":1612,"uses":1449},"\u002Fdocs\u002Fextending\u002Fvocabulary","Teach a word",{"path":1614,"title":1615,"uses":1449},"\u002Fdocs\u002Fextending\u002Fextensions","Run code at boot and shutdown",{"path":1617,"title":1618,"uses":1449},"\u002Fdocs\u002Fextending\u002Fsource-adapter","Write a source adapter",{"path":1620,"title":1621,"uses":1449},"\u002Fdocs\u002Fextending\u002Fsurface","Write a surface",{"path":1623,"title":1624,"uses":1449},"\u002Fdocs\u002Fextending\u002Fforeign-frond","A frond in another language",{"path":1626,"title":1627,"uses":1449},"\u002Fdocs","What is Fougere",[1629],{"title":1630,"path":1626,"stem":1631,"children":1632,"page":-1},"Docs","docs",[1633,1635,1656,1665,1686,1695,1707,1724,1741],{"title":1627,"path":1626,"stem":1634},"docs\u002Findex",{"title":1636,"path":1637,"stem":1638,"children":1639,"page":5},"Concepts","\u002Fdocs\u002Fconcepts","docs\u002F1.concepts",[1640,1642,1644,1646,1648,1650,1652,1654],{"title":1456,"path":1455,"stem":1641},"docs\u002F1.concepts\u002F1.entity",{"title":1459,"path":1458,"stem":1643},"docs\u002F1.concepts\u002F2.handler",{"title":1462,"path":1461,"stem":1645},"docs\u002F1.concepts\u002F3.repository",{"title":1465,"path":1464,"stem":1647},"docs\u002F1.concepts\u002F4.frond",{"title":1468,"path":1467,"stem":1649},"docs\u002F1.concepts\u002F5.facade",{"title":1471,"path":1470,"stem":1651},"docs\u002F1.concepts\u002F6.fact",{"title":1474,"path":1473,"stem":1653},"docs\u002F1.concepts\u002F7.port",{"title":1477,"path":1476,"stem":1655},"docs\u002F1.concepts\u002F8.configuration",{"title":1657,"path":1658,"stem":1659,"children":1660,"page":5},"Access","\u002Fdocs\u002Faccess","docs\u002F2.access",[1661,1663],{"title":1480,"path":1479,"stem":1662},"docs\u002F2.access\u002F1.authentication",{"title":1486,"path":1485,"stem":1664},"docs\u002F2.access\u002F2.state",{"title":1666,"path":1667,"stem":1668,"children":1669,"page":5},"Data","\u002Fdocs\u002Fdata","docs\u002F3.data",[1670,1672,1674,1676,1678,1680,1682,1684],{"title":1492,"path":1491,"stem":1671},"docs\u002F3.data\u002F1.sql",{"title":1496,"path":1495,"stem":1673},"docs\u002F3.data\u002F2.several-databases",{"title":1500,"path":1499,"stem":1675},"docs\u002F3.data\u002F3.computed-field",{"title":1504,"path":1503,"stem":1677},"docs\u002F3.data\u002F4.evolve",{"title":1508,"path":1507,"stem":1679},"docs\u002F3.data\u002F5.seeds",{"title":1512,"path":1511,"stem":1681},"docs\u002F3.data\u002F6.values",{"title":1516,"path":1515,"stem":1683},"docs\u002F3.data\u002F7.mirror",{"title":1521,"path":1520,"stem":1685},"docs\u002F3.data\u002F8.together",{"title":1687,"path":1688,"stem":1689,"children":1690,"page":5},"Behaviour","\u002Fdocs\u002Fbehaviour","docs\u002F4.behaviour",[1691,1693],{"title":1525,"path":1524,"stem":1692},"docs\u002F4.behaviour\u002F1.around-every-call",{"title":1529,"path":1528,"stem":1694},"docs\u002F4.behaviour\u002F2.finish-a-fact",{"title":1696,"path":1697,"stem":1698,"children":1699,"page":5},"Serve","\u002Fdocs\u002Fserve","docs\u002F5.serve",[1700,1702,1704,1705],{"title":1534,"path":1533,"stem":1701},"docs\u002F5.serve\u002F1.rest-graphql",{"title":1538,"path":1537,"stem":1703},"docs\u002F5.serve\u002F2.pages",{"title":8,"path":1446,"stem":1448},{"title":1545,"path":1544,"stem":1706},"docs\u002F5.serve\u002F4.admin",{"title":1708,"path":1709,"stem":1710,"children":1711,"page":5},"Run","\u002Fdocs\u002Frun","docs\u002F6.run",[1712,1714,1716,1718,1720,1722],{"title":1549,"path":1548,"stem":1713},"docs\u002F6.run\u002F1.deploy",{"title":1553,"path":1552,"stem":1715},"docs\u002F6.run\u002F2.secure",{"title":1557,"path":1556,"stem":1717},"docs\u002F6.run\u002F3.lifecycle",{"title":1561,"path":1560,"stem":1719},"docs\u002F6.run\u002F4.observe",{"title":1565,"path":1564,"stem":1721},"docs\u002F6.run\u002F5.dev-panel",{"title":1569,"path":1568,"stem":1723},"docs\u002F6.run\u002F6.test",{"title":1725,"path":1726,"stem":1727,"children":1728,"page":5},"Adopt","\u002Fdocs\u002Fadopt","docs\u002F7.adopt",[1729,1731,1733,1735,1737,1739],{"title":1573,"path":1572,"stem":1730},"docs\u002F7.adopt\u002F1.new-project",{"title":1577,"path":1576,"stem":1732},"docs\u002F7.adopt\u002F2.existing-app",{"title":1581,"path":1580,"stem":1734},"docs\u002F7.adopt\u002F3.bring-your-schema",{"title":1585,"path":1584,"stem":1736},"docs\u002F7.adopt\u002F4.hosts",{"title":1589,"path":1588,"stem":1738},"docs\u002F7.adopt\u002F5.another-repository",{"title":1593,"path":1592,"stem":1740},"docs\u002F7.adopt\u002F6.demos",{"title":1742,"path":1743,"stem":1744,"children":1745,"page":5},"Extending","\u002Fdocs\u002Fextending","docs\u002F8.extending",[1746,1748,1750,1752,1754,1756,1758,1760,1762,1764],{"title":1597,"path":1596,"stem":1747},"docs\u002F8.extending\u002F1.scan",{"title":1600,"path":1599,"stem":1749},"docs\u002F8.extending\u002F10.without-compiler",{"title":1603,"path":1602,"stem":1751},"docs\u002F8.extending\u002F2.boot",{"title":1606,"path":1605,"stem":1753},"docs\u002F8.extending\u002F3.card-and-wire",{"title":1609,"path":1608,"stem":1755},"docs\u002F8.extending\u002F4.extension-points",{"title":1612,"path":1611,"stem":1757},"docs\u002F8.extending\u002F5.vocabulary",{"title":1615,"path":1614,"stem":1759},"docs\u002F8.extending\u002F6.extensions",{"title":1618,"path":1617,"stem":1761},"docs\u002F8.extending\u002F7.source-adapter",{"title":1621,"path":1620,"stem":1763},"docs\u002F8.extending\u002F8.surface",{"title":1624,"path":1623,"stem":1765},"docs\u002F8.extending\u002F9.foreign-frond",1794396613872]