Check if an entered username is unique, by looking in the model-identity table for the given username:

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

Optionally, an rsc_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.

See also

model-identity, validator-email_unique, Forms and validation