modified server-side validation in registration