1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-27 01:18:39 +02:00

Diverses corrections

This commit is contained in:
Yohann D'ANELLO
2020-01-16 22:04:29 +01:00
parent 606ad5886f
commit 95ab142702
10 changed files with 71 additions and 58 deletions

View File

@ -61,7 +61,7 @@ class NewUser
ensure(preg_match("#^[0-9]{4}[0-9]?$#", $this->postal_code) && intval($this->postal_code) >= 01000 && intval($this->postal_code) <= 95999, "Le code postal est invalide.");
if ($this->country == "")
$this->country = "France";
ensure(strlen($this->phone_number) >= 10, "Le numéro de téléphone est invalide.");
ensure(strlen($this->phone_number) >= 10 && strlen($this->phone_number) <= 20, "Le numéro de téléphone est invalide.");
$this->role = Role::fromName(strtoupper($this->role));
if ($this->role == Role::PARTICIPANT) {