parent
3ee14b32c8
commit
1b92c77116
@ -0,0 +1,29 @@ |
||||
<?php |
||||
|
||||
declare(strict_types=1); |
||||
|
||||
/** |
||||
* @author Robert Strutts <Bob_586@Yahoo.com> |
||||
* @copyright (c) 2025, Robert Strutts |
||||
* @license MIT |
||||
*/ |
||||
|
||||
namespace Project\inputs; |
||||
|
||||
use \CodeHydrater\attributes\validators as Assert; |
||||
|
||||
class test_val { |
||||
public function __construct( |
||||
#[Assert\Required] |
||||
#[Assert\Max(70)] |
||||
public ?string $name = null, |
||||
#[Assert\Positive] |
||||
#[Assert\NumberRange(18, 65)] |
||||
public ?int $age = null, |
||||
#[Assert\Between(2, 255)] |
||||
#[Assert\Email] |
||||
public ?string $email = null |
||||
) { |
||||
echo $this->name; |
||||
} |
||||
} |
||||
Loading…
Reference in new issue