'login']); //输入 $inputDate=[ "name" => "kuangweijian", "password" => "123456546", ]; $model->setAttributes($inputDate); //输出 if($model->validate()){ echo "login succ".PHP_EOL; }else{ echo "login failed".PHP_EOL; print_r($model->getErrors()); } ?>