common\models\Post::rules PHP Method

rules() public method

public rules ( )
    public function rules()
    {
        return [[['post_meta_id', 'title', 'content'], 'required'], [['post_meta_id', 'user_id', 'view_count', 'comment_count', 'last_comment_time', 'favorite_count', 'like_count', 'thanks_count', 'hate_count', 'status', 'order', 'created_at', 'updated_at'], 'integer'], [['content'], 'string', 'min' => 2], [['type'], 'string', 'max' => 32], [['last_comment_username'], 'string', 'max' => 20], [['title'], 'string', 'max' => 50, 'min' => 2], [['excerpt', 'image', 'tags'], 'string', 'max' => 255], [['author'], 'string', 'max' => 100], [['cc'], 'safe']];
    }