I set up a similar server validation to check that both username and email are unique upon registration. Vaildation works, only one problem.
When the validation catches a duplicate entry on either the username or email field, the form reloads with the validation prompt, but the form is cleared out and the user has to re-type all the info in again in order to try to register again. Makes the registration process difficult for users.
Any way to preserve the form data? Anyone else have this issue too?