HabitRPG/habitrpg — pull request #4144 by gjoyner (2014-10-14 09:10:32+00:00)
Title: Front page's Forgot Password will report an invalid email address instead of simply errorring. Does NOT include updated locals/en/front.json

**Issue:** https://github.com/HabitRPG/habitrpg/issues/3815
**Referenced Pull Request:** < Placeholder >
The issue with Forgot Password had to do with entering nothing at all in the field and submitting. There was also no validation on the email input.
**Technical Details:** Since the passed variable into authCtrl.resetPassword was null from nothing being in the field, the "Cannot call method `replace` of undefined" error would appear. To make things more appropriate, Angular email validation was implemented. I did give the form a name to try other things, but it probably isn't needed anymore, but doesn't affect anything by being in there. In the authCtrl.resetPassword function, it first checks to see if the email passed in is not null and has a length == 0. If either are true, a message general stating "please input a valid email address" appears via alert(). The language file was updated to show this message. To find this commit, please refer to the reference pull request.