Vaadin 6: Best practice for database access in a Validator

I’m trying to implement a simple requirement where I validate if a username chosen by the user has already been taken. The only way to check this is to query the database. I have placed this functionality into a Validator implementation. When the user commits the Form, I check to see if the username has already been taken. If the username has been taken, a validation error is shown next to the username Field in the Form, prompting the user to select another username.

This all works fine apart from one thing, the number of times the Validator implementation is called by Vaadin. For each commit of the Form, the validator is being called 4 times. Twice in the validate() method of Form, and then twice again with two subsequent calls to TextField.getErrorMessage(). This ends up with a lot of database traffic for a simple request.

What is the best approach for achieving my use case? The Validator approach seems sensible to me, but perhaps I’m missing something? Any suggestions appreciated.