# username\_unique

Source: https://zotonic.com/docs/1432/username_unique

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

Language: en



Check if an entered username is unique by querying <a href="/id/doc_model_model_identity" class="doc-reference doc-reference-model"><code>model#identity</code></a> for the given username:

```django
<input type="text" id="username" name="username" value="" />
{% validate id="username" type={username_unique} %}
```

Optionally, an `id` parameter can be given to the validator to skip that particular id when doing the uniqueness check. This is useful when you are displaying a form in which the user is editing his own user name.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1432?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/1432?language=en>)
