Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 5 Nov 2026. What's built · Install 0.3.0
jadpo
ReferenceErrors

ErrorsBuilt-in services · rule

email.template_not_allowed

On this page

An email template calls a function, does arithmetic or builds a value, when it may only read its fields, translate and format.

Area 16, Built-in services; not declinable; the next step is usually the agent's.

Why Jadpo refuses it

A template reads its email's fields, calls translations and text.format, compares values in {{ if }} and walks lists with {{ for }}. Anything else an email says is worked out in the code that emits it, and given to the email as a field. That keeps the email's words in one place, where a reviewer reads them, rather than spread between the code and its templates.

What it looks like

The welcome email's heading changes its field's value with a call.

domains/accounts/emails/welcome_email.html:

example
<h1>WELCOME, {{ text.upper(name) }}</h1>
jadpo checkcheck failed: 1 error, 3 files

error A template only reads its fields, translates and formats

--> domains/accounts/emails/welcome_email.html:1:17

  |1 | <h1>WELCOME, {{ text.upper(name) }}</h1>  |                 ^^^^^^^^^^^^^^^^ a call
reason
Templates are strict: they read their email's fields, call translations and text.format, compare values in {{ if }} and walk lists with {{ for }}, so what an email says is decided where it is emitted, and a reviewer reads its words in one place.
next
Call only translations.<domain>.<message>(...) and text.format(...); work anything else out where the email is emitted, and give it to the email as a field (agent)
rule
email.template_not_allowed
help
https://jadpo.dev/docs/errors/email.template_not_allowed

(agent) at the end of the next: line means your coding agent can make the fix itself.

How to fix it

If the field can be written as it is, write it out without the call. In domains/accounts/emails/welcome_email.html:

text
<h1>Welcome, {{ name }}</h1>

The heading writes the name as the email was given it.

If the email needs a value worked out, give the email a field for it, and work the value out in the code that emits the email. In domains/accounts/emails/welcome_email.jadpo:

example
    heading_name: Text

Then the template writes the field out. In domains/accounts/emails/welcome_email.html:

text
<h1>WELCOME, {{ heading_name }}</h1>

Every place that emits WelcomeEmail now gives heading_name, so the value is worked out in code a reviewer reads, and the template only writes it.

Markdown for agents: /docs/errors/email.template_not_allowed.md.Built from Jadpo main at aee2e8f.