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.

19 lines
428 B

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