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

Change-Id: I722351d78dc53a4919bcda0ba31b188caa2d38d8
This commit is contained in:
Kevin O'Connor
2014-10-01 14:20:03 -04:00
parent 7e2c68214d
commit aaa7eabd03

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);