<?php

namespace frontend\models;

use yii\base\Model;

/**
 * ContactForm is the model behind the contact form.
 */
class DataForm extends Model
{
    public $fio;
    public $email;
    public $phone;


    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['fio', 'email', 'phone'], 'required'],
            ['email', 'email'],
            [['fio', 'phone'], 'string'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'email' => 'Электронная почта',
            'fio' => 'ФИО',
            'phone' => 'Номер телефона',
        ];
    }
}
