PHP项目开发框架,基于composer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
469 B

<?php
namespace Wiggins\MyProject\Example;
require '../vendor/autoload.php';
use Wiggins\MyProject\UserInput;
$obj=new UserInput(['scenario'=>'register']);
$obj->name='kuangweiian';
$obj->email="12345678@qq.com";
$obj->password="1234567890";
$obj->pwdConfirm="1234567890";
if($obj->validate()){
echo "register succ".PHP_EOL;
}else{
echo "register failed".PHP_EOL;
print_r($obj->getErrors());
}
?>