Adds validation for registration form.