# is\_defined

Source: https://zotonic.com/docs/1847/is_defined

URI: https://zotonic.com/id/1847

Language: en



Tests if a value is defined.

Checks if the value is not empty and outputs a boolean true or false. This is useful in combination with the <a href="/id/doc_template_tag_tag_if" class="doc-reference doc-reference-tag"><code>tag#if</code></a> tag.

For example:

```django
{% if value|is_defined %}The value was defined{% endif %}
```

When the value is “foo” then the output “The value was defined”.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1847?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1847?language=en>)
