codeigniter form_validation email
snippet in php

codeigniter form_validation email

user5858

$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email');

file form validation codeigniter

user1223

if (empty($_FILES['userfile']['name']))
{
    $this->form_validation->set_rules('userfile', 'Image', 'required');
}