Handle registration errors.

This commit is contained in:
David Baker 2015-07-16 14:08:52 +01:00
parent df790c1b54
commit 7aa4d50560
2 changed files with 35 additions and 11 deletions

View file

@ -104,6 +104,15 @@ module.exports = React.createClass({
case this.FieldErrors.PasswordMismatch:
strings.push("Passwords don't match");
break;
case this.FieldErrors.Missing:
strings.push("Missing "+keys[i]);
break;
case this.FieldErrors.TooShort:
strings.push(keys[i]+" is too short");
break;
case this.FieldErrors.InUse:
strings.push(keys[i]+" is already taken");
break;
}
}
var errtxt = strings.join(', ');