This commit is contained in:
vladislav.khorev committed 2014-11-21 08:26:20 +00:00
1 parent 11cc1b9dd1
commit 7bc0e46305
162 files changed
+19744

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
<?php
class AddPostForm extends CFormModel
{
public $title;
public $text;
public $image;
/**
* Declares the validation rules.
* The rules state that username and password are required,
* and password needs to be authenticated.
*/
public function rules()
{
return array(
array('title, text, image', 'required'),
array('image', 'file', 'types'=>'jpg, gif, png'),
);
}
}