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.

20 lines
469 B

  1. <?php
  2. namespace Wiggins\MyProject\Example;
  3. require '../vendor/autoload.php';
  4. use Wiggins\MyProject\UserInput;
  5. $obj=new UserInput(['scenario'=>'register']);
  6. $obj->name='kuangweiian';
  7. $obj->email="12345678@qq.com";
  8. $obj->password="1234567890";
  9. $obj->pwdConfirm="1234567890";
  10. if($obj->validate()){
  11. echo "register succ".PHP_EOL;
  12. }else{
  13. echo "register failed".PHP_EOL;
  14. print_r($obj->getErrors());
  15. }
  16. ?>