Skip to content

E0158: A tag leaves out a required field ​

A component's field tagged vuka:"required" is filled at every tag that uses the component: a slot by <slot:name>…</slot:name> (or the attribute), Children by content between the tags, any other prop by its attribute. A repeated slot's element struct may require fields too, filled on each <slot:x>.

Wrong ​

html
<script lang="go">
package pages

import "example.com/app/components"

// components.Card declares Header ui.Node `vuka:"required"`.
type Orders struct{}
</script>

<components.Card>
  <p>No orders yet.</p>
</components.Card>
html
<script lang="go">
package pages

import "example.com/app/components"

// components.Card declares Header ui.Node `vuka:"required"`.
type Orders struct{}
</script>

<components.Card>
  <slot:header><h2>Orders</h2></slot:header>
  <p>No orders yet.</p>
</components.Card>

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.