progetto fatto precedentemente adattato al framework creato con il corso
filippo.bertilotti
2024-06-10 7d7d7a336e8674a54292abe992b260d9cd2db192
commit | author | age
7d7d7a 1 <?php
F 2     namespace App\Models;
3
4     use PDO;
5     use Framework\Model;
6     class FiatModel extends Model {
7         //protected ?string $table = "product";
8         
9
10         protected function validate(array $data): void {
11             
12             if(empty($data["email"])) {
13                 $this->addError("email","email is required");
14             }
15             if(empty($data["number"])) {
16                 $this->addError("number","cell number is required");
17             }
18
19             var_dump($this->getErrors());
20         }
21     }