for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace app\basic\forms;
use yii\base\Model;
/**
* ContactForm is the model behind the contact form Web Application Basic.
**/
class ContactForm extends Model
{
public $name;
public $email;
public $subject;
public $body;
public $verifyCode;
* rules
*
* @return array the validation rules.
public function rules()
return [
// name, email, subject and body are required
[['name', 'email', 'subject', 'body'], 'required'],
// email has to be a valid email address
['email', 'email'],
// verifyCode needs to be entered correctly
//['verifyCode', \yii\captcha\CaptchaValidator::class],
];
}