mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Prevent leading zeroes in team number and warn user about them (fixes artf3429)
Change-Id: I722351d78dc53a4919bcda0ba31b188caa2d38d8
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user