Form with the nickname field which must be unique


I need to create a form with the nickname field.

Nickname must be unique.

My question is:

Is it possible to create this field in form, where the value given from user will be checked for uniqueness (not previously provided by another user)?