Merge "Prevent leading zeroes in team number and warn user about them (fixes artf3429)"

This commit is contained in:
Brad Miller (WPI)
2014-10-02 11:49:44 -07:00
committed by Gerrit Code Review

View File

@@ -77,8 +77,8 @@ public class TeamNumberPage extends WizardPage {
private void dialogChanged() {
String teamNumber = getTeamNumber();
if (listener != null) listener.stateChanged(null);
if (!teamNumber.matches("^([0-9]+)$")) {
updateStatus("Team number must be a valid integer.");
if (!teamNumber.matches("^([1-9][0-9]*)$")) {
updateStatus("Team number must be a valid integer without leading zeroes.");
return;
}
updateStatus(null);