first commit
This commit is contained in:
40
frontend/models/DataForm.php
Executable file
40
frontend/models/DataForm.php
Executable file
@ -0,0 +1,40 @@
|
||||
<?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' => 'Номер телефона',
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user