<?php /** * Created by Error202 * Date: 10.02.2018 */ namespace core\forms; use yii\base\Model; class SubscribeForm extends Model { public $email; public function rules() { return [ ['email', 'required'], ['email', 'email'], ]; } public function attributeLabels() { return [ 'email' => 'E-mail', ]; } }