diff --git a/app/lib/App/Teamtable/Team.php b/app/lib/App/Teamtable/Team.php
index 540f3b6..077bd8c 100644
--- a/app/lib/App/Teamtable/Team.php
+++ b/app/lib/App/Teamtable/Team.php
@@ -14,7 +14,7 @@ class Team
public string $company = 'NN';
public string $cardnumber = 'NN';
public string $leader = 'NN';
- public int $phone = 0;
+ public string $phone = 'NN';
public int $participants = 0;
public int $rounds = 0;
public ?int $bestTime = NULL;
@@ -79,9 +79,9 @@ class Team
return $this;
}
- public function setPhone(int $phone): Self
+ public function setPhone(string $phone): Self
{
- if ($this->longerThan((string)$phone, 32))
+ if ($this->longerThan($phone, 20))
{
throw new InvalidArgumentException("Phone number is too long!");
}
@@ -91,9 +91,9 @@ class Team
public function setParticipants(int $participants): Self
{
- if ($this->longerThan((string)$participants, 32))
+ if ($participants > 9999)
{
- throw new InvalidArgumentException("Participants is too long!");
+ throw new InvalidArgumentException("Too many participants!");
}
$this->participants = $participants;
return $this;
@@ -101,9 +101,9 @@ class Team
public function setRounds(int $rounds): Self
{
- if ($this->longerThan((string)$rounds, 32))
+ if ($rounds > 9999)
{
- throw new InvalidArgumentException("Rounds is too long!");
+ throw new InvalidArgumentException("Too many rounds!");
}
$this->rounds = $rounds;
return $this;
diff --git a/app/view/pages/race/configure/teams/update.php b/app/view/pages/race/configure/teams/update.php
index d70d6c3..310b5ad 100644
--- a/app/view/pages/race/configure/teams/update.php
+++ b/app/view/pages/race/configure/teams/update.php
@@ -28,13 +28,13 @@
-
+