[{"data":1,"prerenderedAt":2189},["ShallowReactive",2],{"navigation":3,"\u002Fresources\u002Fvalidation":307,"\u002Fresources\u002Fvalidation-surround":2184},{"3.x":4,"2.x":203},[5,32,61,99,121,147,165],{"title":6,"icon":7,"path":8,"stem":9,"children":10,"page":31},"Getting Started","i-heroicons-star","\u002Fgetting-started","1.getting-started",[11,15,19,23,27],{"title":12,"path":13,"stem":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":16,"path":17,"stem":18},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":20,"path":21,"stem":22},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start",{"title":24,"path":25,"stem":26},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F4.configuration",{"title":28,"path":29,"stem":30},"Upgrade guide","\u002Fgetting-started\u002Fupgrade-guide","1.getting-started\u002F5.upgrade-guide",false,{"title":33,"icon":34,"path":35,"stem":36,"children":37,"page":31},"Resources","i-heroicons-document-text","\u002Fresources","2.resources",[38,41,45,49,53,57],{"title":33,"path":39,"stem":40},"\u002Fresources\u002Fresources","2.resources\u002F1.resources",{"title":42,"path":43,"stem":44},"Fields","\u002Fresources\u002Ffields","2.resources\u002F2.fields",{"title":46,"path":47,"stem":48},"Relationships","\u002Fresources\u002Frelations","2.resources\u002F3.relations",{"title":50,"path":51,"stem":52},"Validation","\u002Fresources\u002Fvalidation","2.resources\u002F4.validation",{"title":54,"path":55,"stem":56},"Perimeter","\u002Fresources\u002Fperimeter","2.resources\u002F5.perimeter",{"title":58,"path":59,"stem":60},"Limits","\u002Fresources\u002Flimits","2.resources\u002F6.limits",{"title":62,"icon":63,"path":64,"stem":65,"children":66,"page":31},"Search","i-heroicons-magnifying-glass","\u002Fsearch","3.search",[67,71,75,79,83,87,91,95],{"title":68,"path":69,"stem":70},"Search overview","\u002Fsearch\u002Foverview","3.search\u002F1.overview",{"title":72,"path":73,"stem":74},"Search filters","\u002Fsearch\u002Ffilters","3.search\u002F2.filters",{"title":76,"path":77,"stem":78},"Sorts and selects","\u002Fsearch\u002Fsorts-and-selects","3.search\u002F3.sorts-and-selects",{"title":80,"path":81,"stem":82},"Includes and aggregates","\u002Fsearch\u002Fincludes-and-aggregates","3.search\u002F4.includes-and-aggregates",{"title":84,"path":85,"stem":86},"Scopes and instructions","\u002Fsearch\u002Fscopes-and-instructions","3.search\u002F5.scopes-and-instructions",{"title":88,"path":89,"stem":90},"Text search","\u002Fsearch\u002Ftext-search","3.search\u002F6.text-search",{"title":92,"path":93,"stem":94},"Search engines","\u002Fsearch\u002Fsearch-engines","3.search\u002F7.search-engines",{"title":96,"path":97,"stem":98},"Searching outside HTTP","\u002Fsearch\u002Foutside-http","3.search\u002F8.outside-http",{"title":100,"icon":101,"path":102,"stem":103,"children":104,"page":31},"Writing","i-heroicons-pencil-square","\u002Fwriting","4.writing",[105,109,113,117],{"title":106,"path":107,"stem":108},"Mutate","\u002Fwriting\u002Fmutate","4.writing\u002F1.mutate",{"title":110,"path":111,"stem":112},"Writing relations","\u002Fwriting\u002Frelations","4.writing\u002F2.relations",{"title":114,"path":115,"stem":116},"Versioned rows","\u002Fwriting\u002Fversioned-rows","4.writing\u002F3.versioned-rows",{"title":118,"path":119,"stem":120},"Deleting and restoring","\u002Fwriting\u002Fdeleting","4.writing\u002F4.deleting",{"title":122,"icon":123,"path":124,"stem":125,"children":126,"page":31},"Actions and Metrics","i-heroicons-bolt","\u002Factions-and-metrics","5.actions-and-metrics",[127,131,135,139,143],{"title":128,"path":129,"stem":130},"Actions","\u002Factions-and-metrics\u002Factions","5.actions-and-metrics\u002F1.actions",{"title":132,"path":133,"stem":134},"Queued Actions","\u002Factions-and-metrics\u002Fqueued-actions","5.actions-and-metrics\u002F2.queued-actions",{"title":136,"path":137,"stem":138},"Confirmation","\u002Factions-and-metrics\u002Fconfirmation","5.actions-and-metrics\u002F3.confirmation",{"title":140,"path":141,"stem":142},"Metrics","\u002Factions-and-metrics\u002Fmetrics","5.actions-and-metrics\u002F4.metrics",{"title":144,"path":145,"stem":146},"Exports","\u002Factions-and-metrics\u002Fexports","5.actions-and-metrics\u002F5.exports",{"title":148,"icon":149,"path":150,"stem":151,"children":152,"page":31},"Authorization","i-heroicons-lock-closed","\u002Fauthorization","6.authorization",[153,157,161],{"title":154,"path":155,"stem":156},"Policies","\u002Fauthorization\u002Fpolicies","6.authorization\u002F1.policies",{"title":158,"path":159,"stem":160},"Gates","\u002Fauthorization\u002Fgates","6.authorization\u002F2.gates",{"title":162,"path":163,"stem":164},"Decision Cache","\u002Fauthorization\u002Fdecision-cache","6.authorization\u002F3.decision-cache",{"title":166,"icon":167,"path":168,"stem":169,"children":170,"page":31},"Digging Deeper","i-heroicons-list-bullet","\u002Fdigging-deeper","7.digging-deeper",[171,175,179,183,187,191,195,199],{"title":172,"path":173,"stem":174},"Details","\u002Fdigging-deeper\u002Fdetails","7.digging-deeper\u002F1.details",{"title":176,"path":177,"stem":178},"Events and Hooks","\u002Fdigging-deeper\u002Fevents-and-hooks","7.digging-deeper\u002F2.events-and-hooks",{"title":180,"path":181,"stem":182},"Custom Responses","\u002Fdigging-deeper\u002Fresponses","7.digging-deeper\u002F3.responses",{"title":184,"path":185,"stem":186},"OpenAPI Documentation","\u002Fdigging-deeper\u002Fopenapi","7.digging-deeper\u002F4.openapi",{"title":188,"path":189,"stem":190},"Precognition","\u002Fdigging-deeper\u002Fprecognition","7.digging-deeper\u002F5.precognition",{"title":192,"path":193,"stem":194},"Artisan Commands","\u002Fdigging-deeper\u002Fartisan","7.digging-deeper\u002F6.artisan",{"title":196,"path":197,"stem":198},"Laravel Boost Skill","\u002Fdigging-deeper\u002Fai-skill","7.digging-deeper\u002F7.ai-skill",{"title":200,"path":201,"stem":202},"Translations","\u002Fdigging-deeper\u002Ftranslations","7.digging-deeper\u002F8.translations",[204,215,237,260,297],{"title":6,"icon":7,"path":205,"stem":206,"children":207,"page":31},"\u002F2.x\u002Fgetting-started","2.x\u002F1.getting-started",[208,211],{"title":16,"path":209,"stem":210},"\u002F2.x\u002Fgetting-started\u002Finstallation","2.x\u002F1.getting-started\u002F1.installation",{"title":212,"path":213,"stem":214},"Upgrade Guide","\u002F2.x\u002Fgetting-started\u002Fupgrade-guide","2.x\u002F1.getting-started\u002F2.upgrade-guide",{"title":216,"icon":217,"path":218,"stem":219,"children":220,"page":31},"Endpoints","i-heroicons-arrow-uturn-left","\u002F2.x\u002Fendpoints","2.x\u002F2.endpoints",[221,224,227,230,233],{"title":172,"path":222,"stem":223},"\u002F2.x\u002Fendpoints\u002Fdetails","2.x\u002F2.endpoints\u002F1.details",{"title":62,"path":225,"stem":226},"\u002F2.x\u002Fendpoints\u002Fsearch","2.x\u002F2.endpoints\u002F2.search",{"title":106,"path":228,"stem":229},"\u002F2.x\u002Fendpoints\u002Fmutate","2.x\u002F2.endpoints\u002F3.mutate",{"title":128,"path":231,"stem":232},"\u002F2.x\u002Fendpoints\u002Factions","2.x\u002F2.endpoints\u002F4.actions",{"title":234,"path":235,"stem":236},"Delete","\u002F2.x\u002Fendpoints\u002Fdelete","2.x\u002F2.endpoints\u002F5.delete",{"title":33,"icon":34,"path":238,"stem":239,"children":240,"page":31},"\u002F2.x\u002Fresources","2.x\u002F3.resources",[241,245,249,252,256],{"title":242,"path":243,"stem":244},"Basics","\u002F2.x\u002Fresources\u002Fbasics","2.x\u002F3.resources\u002F1.basics",{"title":246,"path":247,"stem":248},"Exposed Data","\u002F2.x\u002Fresources\u002Fexposed-data","2.x\u002F3.resources\u002F2.exposed-data",{"title":46,"path":250,"stem":251},"\u002F2.x\u002Fresources\u002Frelationships","2.x\u002F3.resources\u002F3.relationships",{"title":253,"path":254,"stem":255},"Validations","\u002F2.x\u002Fresources\u002Fvalidations","2.x\u002F3.resources\u002F4.validations",{"title":257,"path":258,"stem":259},"Interactions","\u002F2.x\u002Fresources\u002Finteractions","2.x\u002F3.resources\u002F5.interactions",{"title":166,"icon":167,"path":261,"stem":262,"children":263,"page":31},"\u002F2.x\u002Fdigging-deeper","2.x\u002F4.digging-deeper",[264,267,271,274,278,282,286,290,294],{"title":128,"path":265,"stem":266},"\u002F2.x\u002Fdigging-deeper\u002Factions","2.x\u002F4.digging-deeper\u002F1.actions",{"title":268,"path":269,"stem":270},"Hooks","\u002F2.x\u002Fdigging-deeper\u002Fhooks","2.x\u002F4.digging-deeper\u002F2.hooks",{"title":158,"path":272,"stem":273},"\u002F2.x\u002Fdigging-deeper\u002Fgates","2.x\u002F4.digging-deeper\u002F3.gates",{"title":275,"path":276,"stem":277},"Authorizations","\u002F2.x\u002Fdigging-deeper\u002Fauthorizations","2.x\u002F4.digging-deeper\u002F4.authorizations",{"title":279,"path":280,"stem":281},"Full Text Search","\u002F2.x\u002Fdigging-deeper\u002Ffull-text-search","2.x\u002F4.digging-deeper\u002F5.full-text-search",{"title":283,"path":284,"stem":285},"Instructions","\u002F2.x\u002Fdigging-deeper\u002Finstructions","2.x\u002F4.digging-deeper\u002F6.instructions",{"title":287,"path":288,"stem":289},"Responses","\u002F2.x\u002Fdigging-deeper\u002Fresponses","2.x\u002F4.digging-deeper\u002F7.responses",{"title":291,"path":292,"stem":293},"Documentation","\u002F2.x\u002Fdigging-deeper\u002Fdocumentation","2.x\u002F4.digging-deeper\u002F8.documentation",{"title":188,"path":295,"stem":296},"\u002F2.x\u002Fdigging-deeper\u002Fprecognition","2.x\u002F4.digging-deeper\u002F9.precognition",{"title":298,"icon":299,"path":300,"stem":301,"children":302,"page":31},"Integrations","i-lucide-puzzle","\u002F2.x\u002Fintegrations","2.x\u002F5.integrations",[303],{"title":304,"path":305,"stem":306},"Flutter","\u002F2.x\u002Fintegrations\u002Fflutter","2.x\u002F5.integrations\u002F1.flutter",{"id":308,"title":50,"body":309,"description":2177,"extension":2178,"links":2179,"meta":2180,"navigation":518,"path":51,"seo":2181,"sitemap":2182,"stem":52,"__hash__":2183},"docs3x\u002F2.resources\u002F4.validation.md",{"type":310,"value":311,"toc":2166},"minimark",[312,321,326,329,433,696,699,787,891,933,937,950,1144,1178,1181,1185,1195,1391,1450,1461,1469,1473,1483,1588,1608,1639,1643,1676,1683,1753,1756,1776,1821,1831,1835,1841,1923,1992,2009,2019,2023,2033,2060,2073,2077,2110,2115,2119,2135,2162],[313,314,315,316,320],"p",{},"Keep your API free of database errors: every value that reaches a column should pass a rule first. If a column is not nullable, make its field required on creation. The package validates every payload before any query, and answers a standard Laravel ",[317,318,319],"code",{},"422"," with the exact key of each error.",[322,323,325],"h2",{"id":324},"field-rules","Field rules",[313,327,328],{},"Each field validates its value with three layers:",[330,331,332,392,406],"ol",{},[333,334,335,336,340,341,344,345,348,349,344,352,348,355,344,358,348,361,344,364,348,367,344,370,373,374,377,378,348,381,344,384,387,388,391],"li",{},"the ",[337,338,339],"strong",{},"base rule"," of its type: ",[317,342,343],{},"string"," for ",[317,346,347],{},"Text",", ",[317,350,351],{},"integer",[317,353,354],{},"Integer",[317,356,357],{},"numeric",[317,359,360],{},"Number",[317,362,363],{},"boolean",[317,365,366],{},"Boolean",[317,368,369],{},"date",[317,371,372],{},"Date"," and ",[317,375,376],{},"DateTime",", the enum for ",[317,379,380],{},"Enum",[317,382,383],{},"array",[317,385,386],{},"Json",", the key type for ",[317,389,390],{},"ID",";",[333,393,394,397,398,401,402,405],{},[317,395,396],{},"nullable",", when the field is ",[317,399,400],{},"nullable()",". Otherwise ",[317,403,404],{},"null"," is refused;",[333,407,408,409,412,413,416,417,348,420,416,423,348,426,373,429,432],{},"the rules you declare: ",[317,410,411],{},"rules()"," on every write, ",[317,414,415],{},"creationRules()"," on ",[317,418,419],{},"create",[317,421,422],{},"updateRules()",[317,424,425],{},"update",[317,427,428],{},"sync",[317,430,431],{},"toggle",".",[434,435,440],"pre",{"className":436,"code":437,"language":438,"meta":439,"style":439},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use Illuminate\\Validation\\Rule;\nuse Lomkit\\Rest\\Fields\\Integer;\nuse Lomkit\\Rest\\Fields\\Text;\n\nText::make('title')\n    ->rules('max:255')\n    ->creationRules('required')\n    ->updateRules('filled'),\nInteger::make('views')->rules('min:0'),\nText::make('status')->rules(Rule::in(['draft', 'published'])),\n","php","",[317,441,442,469,492,513,520,548,568,587,607,641],{"__ignoreMap":439},[443,444,447,451,455,459,461,463,466],"span",{"class":445,"line":446},"line",1,[443,448,450],{"class":449},"sbssI","use",[443,452,454],{"class":453},"sTEyZ"," Illuminate",[443,456,458],{"class":457},"sMK4o","\\",[443,460,50],{"class":453},[443,462,458],{"class":457},[443,464,465],{"class":453},"Rule",[443,467,468],{"class":457},";\n",[443,470,472,474,477,479,482,484,486,488,490],{"class":445,"line":471},2,[443,473,450],{"class":449},[443,475,476],{"class":453}," Lomkit",[443,478,458],{"class":457},[443,480,481],{"class":453},"Rest",[443,483,458],{"class":457},[443,485,42],{"class":453},[443,487,458],{"class":457},[443,489,354],{"class":453},[443,491,468],{"class":457},[443,493,495,497,499,501,503,505,507,509,511],{"class":445,"line":494},3,[443,496,450],{"class":449},[443,498,476],{"class":453},[443,500,458],{"class":457},[443,502,481],{"class":453},[443,504,458],{"class":457},[443,506,42],{"class":453},[443,508,458],{"class":457},[443,510,347],{"class":453},[443,512,468],{"class":457},[443,514,516],{"class":445,"line":515},4,[443,517,519],{"emptyLinePlaceholder":518},true,"\n",[443,521,523,526,529,533,536,539,543,545],{"class":445,"line":522},5,[443,524,347],{"class":525},"sBMFI",[443,527,528],{"class":457},"::",[443,530,532],{"class":531},"s2Zo4","make",[443,534,535],{"class":457},"(",[443,537,538],{"class":457},"'",[443,540,542],{"class":541},"sfazB","title",[443,544,538],{"class":457},[443,546,547],{"class":457},")\n",[443,549,551,554,557,559,561,564,566],{"class":445,"line":550},6,[443,552,553],{"class":457},"    ->",[443,555,556],{"class":531},"rules",[443,558,535],{"class":457},[443,560,538],{"class":457},[443,562,563],{"class":541},"max:255",[443,565,538],{"class":457},[443,567,547],{"class":457},[443,569,571,573,576,578,580,583,585],{"class":445,"line":570},7,[443,572,553],{"class":457},[443,574,575],{"class":531},"creationRules",[443,577,535],{"class":457},[443,579,538],{"class":457},[443,581,582],{"class":541},"required",[443,584,538],{"class":457},[443,586,547],{"class":457},[443,588,590,592,595,597,599,602,604],{"class":445,"line":589},8,[443,591,553],{"class":457},[443,593,594],{"class":531},"updateRules",[443,596,535],{"class":457},[443,598,538],{"class":457},[443,600,601],{"class":541},"filled",[443,603,538],{"class":457},[443,605,606],{"class":457},"),\n",[443,608,610,612,614,616,618,620,623,625,628,630,632,634,637,639],{"class":445,"line":609},9,[443,611,354],{"class":525},[443,613,528],{"class":457},[443,615,532],{"class":531},[443,617,535],{"class":457},[443,619,538],{"class":457},[443,621,622],{"class":541},"views",[443,624,538],{"class":457},[443,626,627],{"class":457},")->",[443,629,556],{"class":531},[443,631,535],{"class":457},[443,633,538],{"class":457},[443,635,636],{"class":541},"min:0",[443,638,538],{"class":457},[443,640,606],{"class":457},[443,642,644,646,648,650,652,654,657,659,661,663,665,667,669,672,675,677,680,682,685,688,691,693],{"class":445,"line":643},10,[443,645,347],{"class":525},[443,647,528],{"class":457},[443,649,532],{"class":531},[443,651,535],{"class":457},[443,653,538],{"class":457},[443,655,656],{"class":541},"status",[443,658,538],{"class":457},[443,660,627],{"class":457},[443,662,556],{"class":531},[443,664,535],{"class":457},[443,666,465],{"class":525},[443,668,528],{"class":457},[443,670,671],{"class":531},"in",[443,673,674],{"class":457},"([",[443,676,538],{"class":457},[443,678,679],{"class":541},"draft",[443,681,538],{"class":457},[443,683,684],{"class":457},",",[443,686,687],{"class":457}," '",[443,689,690],{"class":541},"published",[443,692,538],{"class":457},[443,694,695],{"class":457},"])),\n",[313,697,698],{},"Each method takes Laravel rules: strings, pipe strings, rule objects or closures. Repeated calls add up.",[434,700,704],{"className":701,"code":702,"language":703,"meta":439,"style":439},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\"mutate\": [{\"operation\": \"create\", \"attributes\": {\"title\": 12, \"views\": \"many\"}}]}\n","json",[317,705,706],{"__ignoreMap":439},[443,707,708,711,714,718,720,723,726,728,731,733,735,738,740,742,744,746,749,751,753,756,758,760,762,764,767,769,771,773,775,777,779,782,784],{"class":445,"line":446},[443,709,710],{"class":457},"{",[443,712,713],{"class":457},"\"",[443,715,717],{"class":716},"spNyl","mutate",[443,719,713],{"class":457},[443,721,722],{"class":457},":",[443,724,725],{"class":457}," [{",[443,727,713],{"class":457},[443,729,730],{"class":525},"operation",[443,732,713],{"class":457},[443,734,722],{"class":457},[443,736,737],{"class":457}," \"",[443,739,419],{"class":541},[443,741,713],{"class":457},[443,743,684],{"class":457},[443,745,737],{"class":457},[443,747,748],{"class":525},"attributes",[443,750,713],{"class":457},[443,752,722],{"class":457},[443,754,755],{"class":457}," {",[443,757,713],{"class":457},[443,759,542],{"class":449},[443,761,713],{"class":457},[443,763,722],{"class":457},[443,765,766],{"class":449}," 12",[443,768,684],{"class":457},[443,770,737],{"class":457},[443,772,622],{"class":449},[443,774,713],{"class":457},[443,776,722],{"class":457},[443,778,737],{"class":457},[443,780,781],{"class":541},"many",[443,783,713],{"class":457},[443,785,786],{"class":457},"}}]}\n",[434,788,790],{"className":701,"code":789,"language":703,"meta":439,"style":439},"{\n  \"message\": \"The mutate.0.attributes.title field must be a string. (and 1 more error)\",\n  \"errors\": {\n    \"mutate.0.attributes.title\": [\"The mutate.0.attributes.title field must be a string.\"],\n    \"mutate.0.attributes.views\": [\"The mutate.0.attributes.views field must be an integer.\"]\n  }\n}\n",[317,791,792,797,819,833,858,881,886],{"__ignoreMap":439},[443,793,794],{"class":445,"line":446},[443,795,796],{"class":457},"{\n",[443,798,799,802,805,807,809,811,814,816],{"class":445,"line":471},[443,800,801],{"class":457},"  \"",[443,803,804],{"class":716},"message",[443,806,713],{"class":457},[443,808,722],{"class":457},[443,810,737],{"class":457},[443,812,813],{"class":541},"The mutate.0.attributes.title field must be a string. (and 1 more error)",[443,815,713],{"class":457},[443,817,818],{"class":457},",\n",[443,820,821,823,826,828,830],{"class":445,"line":494},[443,822,801],{"class":457},[443,824,825],{"class":716},"errors",[443,827,713],{"class":457},[443,829,722],{"class":457},[443,831,832],{"class":457}," {\n",[443,834,835,838,841,843,845,848,850,853,855],{"class":445,"line":515},[443,836,837],{"class":457},"    \"",[443,839,840],{"class":525},"mutate.0.attributes.title",[443,842,713],{"class":457},[443,844,722],{"class":457},[443,846,847],{"class":457}," [",[443,849,713],{"class":457},[443,851,852],{"class":541},"The mutate.0.attributes.title field must be a string.",[443,854,713],{"class":457},[443,856,857],{"class":457},"],\n",[443,859,860,862,865,867,869,871,873,876,878],{"class":445,"line":522},[443,861,837],{"class":457},[443,863,864],{"class":525},"mutate.0.attributes.views",[443,866,713],{"class":457},[443,868,722],{"class":457},[443,870,847],{"class":457},[443,872,713],{"class":457},[443,874,875],{"class":541},"The mutate.0.attributes.views field must be an integer.",[443,877,713],{"class":457},[443,879,880],{"class":457},"]\n",[443,882,883],{"class":445,"line":550},[443,884,885],{"class":457},"  }\n",[443,887,888],{"class":445,"line":570},[443,889,890],{"class":457},"}\n",[892,893,894,900,911,918],"ul",{},[333,895,896,897,432],{},"The rules of each field apply at every level of a mutation, under its own key, such as ",[317,898,899],{},"mutate.0.relations.products.1.attributes.price",[333,901,902,903,906,907,910],{},"A rule that names another attribute, such as ",[317,904,905],{},"required_if:featured,true"," or ",[317,908,909],{},"after_or_equal:published_on",", compares with that attribute in the same entry when the resource declares a field of that name.",[333,912,913,914,917],{},"A ",[317,915,916],{},"Rule::when()"," condition receives the attributes of its entry.",[333,919,920,921,924,925,928,929,432],{},"The pivot fields of a many-to-many relation validate the ",[317,922,923],{},"pivot"," of each entry the same way, under ",[317,926,927],{},"mutate.0.relations.tags.0.pivot.weight",". See ",[930,931,46],"a",{"href":932},"\u002Fresources\u002Frelations#pivot-fields",[322,934,936],{"id":935},"resource-rules","Resource rules",[313,938,939,348,941,373,944,946,947,949],{},[317,940,411],{},[317,942,943],{},"createRules()",[317,945,422],{}," on the resource hold the rules that do not belong to one field: rules that compare attributes, and nested keys of a ",[317,948,386],{}," field:",[434,951,953],{"className":436,"code":952,"language":438,"meta":439,"style":439},"public function rules(): array\n{\n    return [\n        'metadata.source' => ['nullable', 'url'],\n        'ends_on' => ['after:starts_on'],\n    ];\n}\n\npublic function createRules(): array\n{\n    return [\n        'name' => 'string|min:3',\n    ];\n}\n\npublic function updateRules(): array\n{\n    return [];\n}\n",[317,954,955,972,976,985,1017,1039,1044,1048,1052,1065,1069,1076,1097,1102,1107,1112,1126,1131,1139],{"__ignoreMap":439},[443,956,957,960,963,966,969],{"class":445,"line":446},[443,958,959],{"class":716},"public",[443,961,962],{"class":716}," function",[443,964,965],{"class":531}," rules",[443,967,968],{"class":457},"():",[443,970,971],{"class":449}," array\n",[443,973,974],{"class":445,"line":471},[443,975,796],{"class":457},[443,977,978,982],{"class":445,"line":494},[443,979,981],{"class":980},"s7zQu","    return",[443,983,984],{"class":457}," [\n",[443,986,987,990,993,995,998,1000,1002,1004,1006,1008,1010,1013,1015],{"class":445,"line":515},[443,988,989],{"class":457},"        '",[443,991,992],{"class":541},"metadata.source",[443,994,538],{"class":457},[443,996,997],{"class":457}," =>",[443,999,847],{"class":457},[443,1001,538],{"class":457},[443,1003,396],{"class":541},[443,1005,538],{"class":457},[443,1007,684],{"class":457},[443,1009,687],{"class":457},[443,1011,1012],{"class":541},"url",[443,1014,538],{"class":457},[443,1016,857],{"class":457},[443,1018,1019,1021,1024,1026,1028,1030,1032,1035,1037],{"class":445,"line":522},[443,1020,989],{"class":457},[443,1022,1023],{"class":541},"ends_on",[443,1025,538],{"class":457},[443,1027,997],{"class":457},[443,1029,847],{"class":457},[443,1031,538],{"class":457},[443,1033,1034],{"class":541},"after:starts_on",[443,1036,538],{"class":457},[443,1038,857],{"class":457},[443,1040,1041],{"class":445,"line":550},[443,1042,1043],{"class":457},"    ];\n",[443,1045,1046],{"class":445,"line":570},[443,1047,890],{"class":457},[443,1049,1050],{"class":445,"line":589},[443,1051,519],{"emptyLinePlaceholder":518},[443,1053,1054,1056,1058,1061,1063],{"class":445,"line":609},[443,1055,959],{"class":716},[443,1057,962],{"class":716},[443,1059,1060],{"class":531}," createRules",[443,1062,968],{"class":457},[443,1064,971],{"class":449},[443,1066,1067],{"class":445,"line":643},[443,1068,796],{"class":457},[443,1070,1072,1074],{"class":445,"line":1071},11,[443,1073,981],{"class":980},[443,1075,984],{"class":457},[443,1077,1079,1081,1084,1086,1088,1090,1093,1095],{"class":445,"line":1078},12,[443,1080,989],{"class":457},[443,1082,1083],{"class":541},"name",[443,1085,538],{"class":457},[443,1087,997],{"class":457},[443,1089,687],{"class":457},[443,1091,1092],{"class":541},"string|min:3",[443,1094,538],{"class":457},[443,1096,818],{"class":457},[443,1098,1100],{"class":445,"line":1099},13,[443,1101,1043],{"class":457},[443,1103,1105],{"class":445,"line":1104},14,[443,1106,890],{"class":457},[443,1108,1110],{"class":445,"line":1109},15,[443,1111,519],{"emptyLinePlaceholder":518},[443,1113,1115,1117,1119,1122,1124],{"class":445,"line":1114},16,[443,1116,959],{"class":716},[443,1118,962],{"class":716},[443,1120,1121],{"class":531}," updateRules",[443,1123,968],{"class":457},[443,1125,971],{"class":449},[443,1127,1129],{"class":445,"line":1128},17,[443,1130,796],{"class":457},[443,1132,1134,1136],{"class":445,"line":1133},18,[443,1135,981],{"class":980},[443,1137,1138],{"class":457}," [];\n",[443,1140,1142],{"class":445,"line":1141},19,[443,1143,890],{"class":457},[313,1145,1146,1147,416,1149,906,1151,416,1153,348,1155,373,1157,1159,1160,1162,1163,1166,1167,373,1169,1166,1172,1174,1175,432],{},"Each key gets one list: the field rules, then ",[317,1148,943],{},[317,1150,419],{},[317,1152,422],{},[317,1154,425],{},[317,1156,428],{},[317,1158,431],{},", then ",[317,1161,411],{},". Pipe strings are split before the merge, so ",[317,1164,1165],{},"'required'"," in ",[317,1168,943],{},[317,1170,1171],{},"'string|min:3'",[317,1173,411],{}," give ",[317,1176,1177],{},"['required', 'string', 'min:3']",[313,1179,1180],{},"The three methods are read once per request, and every entry of the mutation shares the rule objects they return.",[322,1182,1184],{"id":1183},"rules-that-depend-on-the-entry","Rules that depend on the entry",[313,1186,1187,1188,1191,1192,722],{},"A rule that needs the entry it validates, such as a unique rule that ignores the row being updated, is built with ",[317,1189,1190],{},"Contextual::rule()",". The closure receives a ",[317,1193,1194],{},"Lomkit\\Rest\\Mutations\\MutationContext",[434,1196,1198],{"className":436,"code":1197,"language":438,"meta":439,"style":439},"use Illuminate\\Validation\\Rule;\nuse Illuminate\\Validation\\Rules\\Unique;\nuse Lomkit\\Rest\\Mutations\\Contextual;\nuse Lomkit\\Rest\\Mutations\\MutationContext;\n\nText::make('title')->rules(\n    Contextual::rule(fn (MutationContext $mutation): Unique => Rule::unique(Post::class, 'title')->ignore($mutation->key)),\n),\n",[317,1199,1200,1216,1238,1260,1281,1285,1308,1387],{"__ignoreMap":439},[443,1201,1202,1204,1206,1208,1210,1212,1214],{"class":445,"line":446},[443,1203,450],{"class":449},[443,1205,454],{"class":453},[443,1207,458],{"class":457},[443,1209,50],{"class":453},[443,1211,458],{"class":457},[443,1213,465],{"class":453},[443,1215,468],{"class":457},[443,1217,1218,1220,1222,1224,1226,1228,1231,1233,1236],{"class":445,"line":471},[443,1219,450],{"class":449},[443,1221,454],{"class":453},[443,1223,458],{"class":457},[443,1225,50],{"class":453},[443,1227,458],{"class":457},[443,1229,1230],{"class":453},"Rules",[443,1232,458],{"class":457},[443,1234,1235],{"class":453},"Unique",[443,1237,468],{"class":457},[443,1239,1240,1242,1244,1246,1248,1250,1253,1255,1258],{"class":445,"line":494},[443,1241,450],{"class":449},[443,1243,476],{"class":453},[443,1245,458],{"class":457},[443,1247,481],{"class":453},[443,1249,458],{"class":457},[443,1251,1252],{"class":453},"Mutations",[443,1254,458],{"class":457},[443,1256,1257],{"class":453},"Contextual",[443,1259,468],{"class":457},[443,1261,1262,1264,1266,1268,1270,1272,1274,1276,1279],{"class":445,"line":515},[443,1263,450],{"class":449},[443,1265,476],{"class":453},[443,1267,458],{"class":457},[443,1269,481],{"class":453},[443,1271,458],{"class":457},[443,1273,1252],{"class":453},[443,1275,458],{"class":457},[443,1277,1278],{"class":453},"MutationContext",[443,1280,468],{"class":457},[443,1282,1283],{"class":445,"line":522},[443,1284,519],{"emptyLinePlaceholder":518},[443,1286,1287,1289,1291,1293,1295,1297,1299,1301,1303,1305],{"class":445,"line":550},[443,1288,347],{"class":525},[443,1290,528],{"class":457},[443,1292,532],{"class":531},[443,1294,535],{"class":457},[443,1296,538],{"class":457},[443,1298,542],{"class":541},[443,1300,538],{"class":457},[443,1302,627],{"class":457},[443,1304,556],{"class":531},[443,1306,1307],{"class":457},"(\n",[443,1309,1310,1313,1315,1318,1320,1323,1326,1328,1331,1334,1337,1340,1342,1345,1347,1350,1352,1355,1357,1360,1362,1364,1366,1368,1370,1373,1376,1378,1381,1384],{"class":445,"line":570},[443,1311,1312],{"class":525},"    Contextual",[443,1314,528],{"class":457},[443,1316,1317],{"class":531},"rule",[443,1319,535],{"class":457},[443,1321,1322],{"class":716},"fn",[443,1324,1325],{"class":457}," (",[443,1327,1278],{"class":525},[443,1329,1330],{"class":457}," $",[443,1332,1333],{"class":453},"mutation",[443,1335,1336],{"class":457},"):",[443,1338,1339],{"class":525}," Unique",[443,1341,997],{"class":457},[443,1343,1344],{"class":525}," Rule",[443,1346,528],{"class":457},[443,1348,1349],{"class":531},"unique",[443,1351,535],{"class":457},[443,1353,1354],{"class":525},"Post",[443,1356,528],{"class":457},[443,1358,1359],{"class":449},"class",[443,1361,684],{"class":457},[443,1363,687],{"class":457},[443,1365,542],{"class":541},[443,1367,538],{"class":457},[443,1369,627],{"class":457},[443,1371,1372],{"class":531},"ignore",[443,1374,1375],{"class":457},"($",[443,1377,1333],{"class":453},[443,1379,1380],{"class":457},"->",[443,1382,1383],{"class":453},"key",[443,1385,1386],{"class":457},")),\n",[443,1388,1389],{"class":445,"line":589},[443,1390,606],{"class":457},[1392,1393,1394,1407],"table",{},[1395,1396,1397],"thead",{},[1398,1399,1400,1404],"tr",{},[1401,1402,1403],"th",{},"Property",[1401,1405,1406],{},"Holds",[1408,1409,1410,1423,1437],"tbody",{},[1398,1411,1412,1417],{},[1413,1414,1415],"td",{},[317,1416,730],{},[1413,1418,335,1419,1422],{},[317,1420,1421],{},"Lomkit\\Rest\\Fields\\MutationOperation"," of the entry",[1398,1424,1425,1429],{},[1413,1426,1427],{},[317,1428,1383],{},[1413,1430,1431,1432,416,1434,1436],{},"the key of the entry, ",[317,1433,404],{},[317,1435,419],{}," and for a key list",[1398,1438,1439,1444],{},[1413,1440,1441],{},[317,1442,1443],{},"depth",[1413,1445,1446,1449],{},[317,1447,1448],{},"0"," at the root, one more per relation level",[313,1451,1452,1453,1456,1457,1460],{},"The closure returns a rule, a pipe string or a list of rules. A rule object can implement ",[317,1454,1455],{},"Lomkit\\Rest\\Mutations\\MutationAwareRule"," instead: the package calls its ",[317,1458,1459],{},"setMutation(MutationContext $mutation): static"," on a clone of the rule for each entry.",[313,1462,1463,373,1465,1468],{},[317,1464,1190],{},[317,1466,1467],{},"MutationAwareRule"," apply to the attributes and the pivot of a mutation. Elsewhere, such as in the rules of an action field, a contextual rule throws: \"A contextual rule only applies to the attributes and the pivot of a mutation.\"",[322,1470,1472],{"id":1471},"labels-and-messages","Labels and messages",[313,1474,1475,1478,1479,1482],{},[317,1476,1477],{},"label()"," names the key of a field in validation messages. ",[317,1480,1481],{},"messages()"," replaces Laravel's text for the rules of that key, keyed by rule name:",[434,1484,1486],{"className":436,"code":1485,"language":438,"meta":439,"style":439},"Text::make('email')\n    ->label(__('email address'))\n    ->creationRules('required', 'unique:users,email')\n    ->messages(['unique' => __('This :attribute is already registered.')]),\n",[317,1487,1488,1507,1531,1556],{"__ignoreMap":439},[443,1489,1490,1492,1494,1496,1498,1500,1503,1505],{"class":445,"line":446},[443,1491,347],{"class":525},[443,1493,528],{"class":457},[443,1495,532],{"class":531},[443,1497,535],{"class":457},[443,1499,538],{"class":457},[443,1501,1502],{"class":541},"email",[443,1504,538],{"class":457},[443,1506,547],{"class":457},[443,1508,1509,1511,1514,1516,1519,1521,1523,1526,1528],{"class":445,"line":471},[443,1510,553],{"class":457},[443,1512,1513],{"class":531},"label",[443,1515,535],{"class":457},[443,1517,1518],{"class":531},"__",[443,1520,535],{"class":457},[443,1522,538],{"class":457},[443,1524,1525],{"class":541},"email address",[443,1527,538],{"class":457},[443,1529,1530],{"class":457},"))\n",[443,1532,1533,1535,1537,1539,1541,1543,1545,1547,1549,1552,1554],{"class":445,"line":494},[443,1534,553],{"class":457},[443,1536,575],{"class":531},[443,1538,535],{"class":457},[443,1540,538],{"class":457},[443,1542,582],{"class":541},[443,1544,538],{"class":457},[443,1546,684],{"class":457},[443,1548,687],{"class":457},[443,1550,1551],{"class":541},"unique:users,email",[443,1553,538],{"class":457},[443,1555,547],{"class":457},[443,1557,1558,1560,1563,1565,1567,1569,1571,1573,1576,1578,1580,1583,1585],{"class":445,"line":515},[443,1559,553],{"class":457},[443,1561,1562],{"class":531},"messages",[443,1564,674],{"class":457},[443,1566,538],{"class":457},[443,1568,1349],{"class":541},[443,1570,538],{"class":457},[443,1572,997],{"class":457},[443,1574,1575],{"class":531}," __",[443,1577,535],{"class":457},[443,1579,538],{"class":457},[443,1581,1582],{"class":541},"This :attribute is already registered.",[443,1584,538],{"class":457},[443,1586,1587],{"class":457},")]),\n",[313,1589,1590,1591,1593,1594,1596,1597,1600,1601,1604,1605,432],{},"On ",[317,1592,419],{},", without ",[317,1595,1502],{},", the error is ",[317,1598,1599],{},"The email address field is required.",", and with a taken address ",[317,1602,1603],{},"This email address is already registered.",", both under ",[317,1606,1607],{},"mutate.0.attributes.email",[892,1609,1610,1616,1623,1633],{},[333,1611,1612,1613,1615],{},"The labels and messages apply to the attributes of ",[317,1614,717],{}," at every level, to pivot fields, to the fields of actions and instructions, and to the parameters of scopes. The error keys do not change.",[333,1617,1618,1619,1622],{},"The package does not translate them: pass a translated string. The declarations are read during the request, so ",[317,1620,1621],{},"__()"," follows its locale.",[333,1624,1625,1626,1629,1630,1632],{},"A rule object is keyed by its snake class name, such as ",[317,1627,1628],{},"enum"," for the rule of an ",[317,1631,380],{}," field.",[333,1634,913,1635,1638],{},[317,1636,1637],{},"validation.attributes"," line of your translation files still names a key that has no label.",[322,1640,1642],{"id":1641},"package-messages","Package messages",[313,1644,1645,1646,1648,1649,1652,1653,348,1656,373,1659,1662,1663,348,1666,906,1669,1672,1673,432],{},"The messages that the package writes itself, such as the totals, the depths, the include aliases, the not-writable text of ",[317,1647,717],{}," and the relation texts, are translation lines under the ",[317,1650,1651],{},"rest"," namespace: ",[317,1654,1655],{},"rest::validation",[317,1657,1658],{},"rest::actions",[317,1660,1661],{},"rest::errors",". The package ships them in English and French, and answers in the locale of the request. Laravel's own lines, such as ",[317,1664,1665],{},"validation.prohibited",[317,1667,1668],{},"validation.max.array",[317,1670,1671],{},"validation.exists",", still come from your ",[317,1674,1675],{},"lang\u002F\u003Clocale>\u002Fvalidation.php",[313,1677,1678,1679,1682],{},"With the ",[317,1680,1681],{},"fr"," locale, a relation that the resource does not declare gives:",[434,1684,1687],{"className":701,"code":1685,"filename":1686,"language":703,"meta":439,"style":439},"{\n  \"message\": \"La clé suppliers n'est pas valide pour le champ mutate.0.relations.\",\n  \"errors\": {\n    \"mutate.0.relations\": [\"La clé suppliers n'est pas valide pour le champ mutate.0.relations.\"]\n  }\n}\n","422 Unprocessable Content",[317,1688,1689,1693,1712,1724,1745,1749],{"__ignoreMap":439},[443,1690,1691],{"class":445,"line":446},[443,1692,796],{"class":457},[443,1694,1695,1697,1699,1701,1703,1705,1708,1710],{"class":445,"line":471},[443,1696,801],{"class":457},[443,1698,804],{"class":716},[443,1700,713],{"class":457},[443,1702,722],{"class":457},[443,1704,737],{"class":457},[443,1706,1707],{"class":541},"La clé suppliers n'est pas valide pour le champ mutate.0.relations.",[443,1709,713],{"class":457},[443,1711,818],{"class":457},[443,1713,1714,1716,1718,1720,1722],{"class":445,"line":494},[443,1715,801],{"class":457},[443,1717,825],{"class":716},[443,1719,713],{"class":457},[443,1721,722],{"class":457},[443,1723,832],{"class":457},[443,1725,1726,1728,1731,1733,1735,1737,1739,1741,1743],{"class":445,"line":515},[443,1727,837],{"class":457},[443,1729,1730],{"class":525},"mutate.0.relations",[443,1732,713],{"class":457},[443,1734,722],{"class":457},[443,1736,847],{"class":457},[443,1738,713],{"class":457},[443,1740,1707],{"class":541},[443,1742,713],{"class":457},[443,1744,880],{"class":457},[443,1746,1747],{"class":445,"line":522},[443,1748,885],{"class":457},[443,1750,1751],{"class":445,"line":550},[443,1752,890],{"class":457},[313,1754,1755],{},"Publish the files to change a line or add a locale:",[434,1757,1761],{"className":1758,"code":1759,"language":1760,"meta":439,"style":439},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","php artisan vendor:publish --tag=rest-lang\n","bash",[317,1762,1763],{"__ignoreMap":439},[443,1764,1765,1767,1770,1773],{"class":445,"line":446},[443,1766,438],{"class":525},[443,1768,1769],{"class":541}," artisan",[443,1771,1772],{"class":541}," vendor:publish",[443,1774,1775],{"class":541}," --tag=rest-lang\n",[434,1777,1780],{"className":436,"code":1778,"filename":1779,"language":438,"meta":439,"style":439},"return [\n    'unknown_key' => 'La relation :key est inconnue sous :attribute.',\n    \u002F\u002F ...\n];\n","lang\u002Fvendor\u002Frest\u002Ffr\u002Fvalidation.php",[317,1781,1782,1789,1810,1816],{"__ignoreMap":439},[443,1783,1784,1787],{"class":445,"line":446},[443,1785,1786],{"class":980},"return",[443,1788,984],{"class":457},[443,1790,1791,1794,1797,1799,1801,1803,1806,1808],{"class":445,"line":471},[443,1792,1793],{"class":457},"    '",[443,1795,1796],{"class":541},"unknown_key",[443,1798,538],{"class":457},[443,1800,997],{"class":457},[443,1802,687],{"class":457},[443,1804,1805],{"class":541},"La relation :key est inconnue sous :attribute.",[443,1807,538],{"class":457},[443,1809,818],{"class":457},[443,1811,1812],{"class":445,"line":494},[443,1813,1815],{"class":1814},"sHwdD","    \u002F\u002F ...\n",[443,1817,1818],{"class":445,"line":515},[443,1819,1820],{"class":457},"];\n",[313,1822,1823,1824,1827,1828,1830],{},"The same request then gives ",[317,1825,1826],{},"La relation suppliers est inconnue sous mutate.0.relations.",". A JSON line keyed by the English sentence no longer applies to these messages. See ",[930,1829,200],{"href":201}," for every file and line.",[322,1832,1834],{"id":1833},"unknown-keys","Unknown keys",[313,1836,1837,1838,1840],{},"Inside an object of a payload, a key that the package does not know gives a ",[317,1839,319],{}," on that key, named as written:",[434,1842,1844],{"className":701,"code":1843,"language":703,"meta":439,"style":439},"{\"search\": {\"filters\": [{\"field\": \"price\", \"operater\": \"\u003C\", \"value\": 100}]}}\n",[317,1845,1846],{"__ignoreMap":439},[443,1847,1848,1850,1852,1855,1857,1859,1861,1863,1866,1868,1870,1872,1874,1877,1879,1881,1883,1886,1888,1890,1892,1895,1897,1899,1901,1904,1906,1908,1910,1913,1915,1917,1920],{"class":445,"line":446},[443,1849,710],{"class":457},[443,1851,713],{"class":457},[443,1853,1854],{"class":716},"search",[443,1856,713],{"class":457},[443,1858,722],{"class":457},[443,1860,755],{"class":457},[443,1862,713],{"class":457},[443,1864,1865],{"class":525},"filters",[443,1867,713],{"class":457},[443,1869,722],{"class":457},[443,1871,725],{"class":457},[443,1873,713],{"class":457},[443,1875,1876],{"class":449},"field",[443,1878,713],{"class":457},[443,1880,722],{"class":457},[443,1882,737],{"class":457},[443,1884,1885],{"class":541},"price",[443,1887,713],{"class":457},[443,1889,684],{"class":457},[443,1891,737],{"class":457},[443,1893,1894],{"class":449},"operater",[443,1896,713],{"class":457},[443,1898,722],{"class":457},[443,1900,737],{"class":457},[443,1902,1903],{"class":541},"\u003C",[443,1905,713],{"class":457},[443,1907,684],{"class":457},[443,1909,737],{"class":457},[443,1911,1912],{"class":449},"value",[443,1914,713],{"class":457},[443,1916,722],{"class":457},[443,1918,1919],{"class":449}," 100",[443,1921,1922],{"class":457},"}]}}\n",[434,1924,1926],{"className":701,"code":1925,"language":703,"meta":439,"style":439},"{\n  \"message\": \"The search.filters.0.operater field is prohibited.\",\n  \"errors\": {\n    \"search.filters.0.operater\": [\"The search.filters.0.operater field is prohibited.\"]\n  }\n}\n",[317,1927,1928,1932,1951,1963,1984,1988],{"__ignoreMap":439},[443,1929,1930],{"class":445,"line":446},[443,1931,796],{"class":457},[443,1933,1934,1936,1938,1940,1942,1944,1947,1949],{"class":445,"line":471},[443,1935,801],{"class":457},[443,1937,804],{"class":716},[443,1939,713],{"class":457},[443,1941,722],{"class":457},[443,1943,737],{"class":457},[443,1945,1946],{"class":541},"The search.filters.0.operater field is prohibited.",[443,1948,713],{"class":457},[443,1950,818],{"class":457},[443,1952,1953,1955,1957,1959,1961],{"class":445,"line":494},[443,1954,801],{"class":457},[443,1956,825],{"class":716},[443,1958,713],{"class":457},[443,1960,722],{"class":457},[443,1962,832],{"class":457},[443,1964,1965,1967,1970,1972,1974,1976,1978,1980,1982],{"class":445,"line":515},[443,1966,837],{"class":457},[443,1968,1969],{"class":525},"search.filters.0.operater",[443,1971,713],{"class":457},[443,1973,722],{"class":457},[443,1975,847],{"class":457},[443,1977,713],{"class":457},[443,1979,1946],{"class":541},[443,1981,713],{"class":457},[443,1983,880],{"class":457},[443,1985,1986],{"class":445,"line":522},[443,1987,885],{"class":457},[443,1989,1990],{"class":445,"line":550},[443,1991,890],{"class":457},[313,1993,1994,1995,1998,1999,2002,2003,2005,2006],{},"This covers the filters, sorts, selects, scopes, aggregates, includes, instructions and ",[317,1996,1997],{},"text"," of a search, the entries of the ",[317,2000,2001],{},"fields"," of an action or an instruction, and the entries of ",[317,2004,717],{},": ",[317,2007,2008],{},"The mutate.0.atributes field is prohibited.",[313,2010,2011,2012,2014,2015,2018],{},"A key at the first level is ignored, so that a later release can add keys: a key of the request body, of ",[317,2013,1854],{},", or of the ",[317,2016,2017],{},"response"," block of a mutation.",[322,2020,2022],{"id":2021},"keys","Keys",[313,2024,2025,2026,2028,2029,2032],{},"Every key that a client sends is typed by the ",[317,2027,390],{}," field of its resource, and checked through the ",[317,2030,2031],{},"perimeterQuery()"," of that resource:",[892,2034,2035,2042],{},[333,2036,2037,1166,2039,2041],{},[317,2038,1383],{},[317,2040,717],{},", at the root and under relations;",[333,2043,2044,416,2047,348,2050,373,2053,2056,2057,2059],{},[317,2045,2046],{},"resources",[317,2048,2049],{},"destroy",[317,2051,2052],{},"restore",[317,2054,2055],{},"forceDestroy",", and on the actions with the ",[317,2058,33],{}," target.",[313,2061,2062,2063,2066,2067,2070,2071,432],{},"A key of the wrong type gives a type message, such as ",[317,2064,2065],{},"The mutate.0.key field must be an integer.",". A key that the perimeter does not return gives ",[317,2068,2069],{},"The selected mutate.0.key is invalid.",", as a key that does not exist. The check runs one query per resource class and per 1,000 keys, and the endpoint writes the rows that this query loaded. See ",[930,2072,54],{"href":55},[322,2074,2076],{"id":2075},"lists","Lists",[313,2078,2079,2080,348,2082,348,2085,348,2088,2090,2091,2093,2094,2096,2097,2099,2100,2102,2103,2106,2107,432],{},"Each list of a payload must be a JSON list: ",[317,2081,1865],{},[317,2083,2084],{},"sorts",[317,2086,2087],{},"includes",[317,2089,717],{},", a to-many relation, a ",[317,2092,1383],{}," list, ",[317,2095,2046],{},", and the ",[317,2098,2001],{}," of an action or an instruction. An object gives a ",[317,2101,319],{}," on the list: ",[317,2104,2105],{},"The search.filters field must be a list.",". An entry that is not an object gives ",[317,2108,2109],{},"The search.sorts.0 field must be an array.",[313,2111,2112,2113,432],{},"Each list accepts a limited number of entries. See ",[930,2114,58],{"href":59},[322,2116,2118],{"id":2117},"one-validator-per-request","One validator per request",[313,2120,2121,2122,348,2125,373,2128,2131,2132,2134],{},"Each request turns its payload into Laravel rules on explicit keys, such as ",[317,2123,2124],{},"search.filters.0.field",[317,2126,2127],{},"fields.0.name",[317,2129,2130],{},"mutate.0.attributes.name",", then validates them in one pass with one Laravel validator. Every error of the payload comes back in one ",[317,2133,319],{},", nested filters, includes, instructions and relations included.",[892,2136,2137,2148,2151,2157],{},[333,2138,2139,2140,2143,2144,928,2146,432],{},"The policy checks of the endpoint and of every resource that the payload reaches run before validation: a denied check answers ",[317,2141,2142],{},"403"," before any ",[317,2145,319],{},[930,2147,154],{"href":155},[333,2149,2150],{},"Nothing is written before the payload passes. The key checks above read their rows during validation.",[333,2152,2153,2156],{},[317,2154,2155],{},"$request->payload()"," returns the validated payload as typed nodes once the request passed validation.",[333,2158,2159,2160,432],{},"With Precognition enabled, a request can validate a payload, or one key of it, without running the endpoint. See ",[930,2161,188],{"href":189},[2163,2164,2165],"style",{},"html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":439,"searchDepth":446,"depth":471,"links":2167},[2168,2169,2170,2171,2172,2173,2174,2175,2176],{"id":324,"depth":471,"text":325},{"id":935,"depth":471,"text":936},{"id":1183,"depth":471,"text":1184},{"id":1471,"depth":471,"text":1472},{"id":1641,"depth":471,"text":1642},{"id":1833,"depth":471,"text":1834},{"id":2021,"depth":471,"text":2022},{"id":2075,"depth":471,"text":2076},{"id":2117,"depth":471,"text":2118},"Field rules, resource rules, rules that depend on the entry, labels and messages, unknown keys, and how the package validates each payload in one pass.","md",null,{},{"title":50,"description":2177},{"loc":51},"M0GDAiLIusIRNLsCKVbdQPBl6ZwZGTbAvWLBZKGLq90",[2185,2187],{"title":46,"path":47,"stem":48,"description":2186,"children":-1},"Declare the Eloquent relations of a resource, their targets, pivot fields, constraints, link abilities and the operations a mutation accepts on them.",{"title":54,"path":55,"stem":56,"description":2188,"children":-1},"perimeterQuery() sets the rows that exist for a client, on every endpoint and at every level of a request. Learn where it applies and how to write it.",1794181350219]