Added $data to the register event and email validation.