added validations and errors for registration page