Hi
On your web site ,
www.yiiframework.com / doc-2.0 / guide-start-forms.html ,
you wrote the second code as like as :
<?php
$model = new EntryForm();
$model->name = 'Qiang';
$model->email = 'bad';
if ($model->validate()) {
// Good!
} else {
// Failure!
// Use $model->getErrors()
}
but I don’t know which file I must put it.
Could you write me which file and which directory ?
I followed the explanation except this step like this :
Creating a Model - > .../models/EntryForm.php
Creating an Action - > .../controllers/SiteController.php
Creating Views - > .../views/site/entry-confirm.php
And when I tried it (127.0.0.10 / web / index.php?r=site%2Fentry), I have a this message :
Error
Class ‘app\controllers\EntryForm’ not found
Thanks