Welcome Guest, Not a member yet? Register   Sign In
Validation problem for form_upload
#4

[eluser]cinewbie81[/eluser]
Let's say i have a form_input and a form_upload component . How can I do the verification for both component together ?? My code again:

Code:
form_upload('csvFile', 'csvFile')
form_input('name', 'name')

Code:
$rules['csvFile'] = "required";
$rules['name'] = "required";
$this->validation->set_rules($rules);

$fields['csvFile'] = 'CSV file';
$fields['name'] = "Name";
$this->validation->set_fields($fields);    

if ($this->validation->run() == FALSE)
{
    // Form Validation Error
} else {
    // Form Validation Success
}


Messages In This Thread
Validation problem for form_upload - by El Forum - 01-02-2008, 03:11 AM
Validation problem for form_upload - by El Forum - 01-02-2008, 03:15 AM
Validation problem for form_upload - by El Forum - 01-02-2008, 03:33 AM
Validation problem for form_upload - by El Forum - 01-02-2008, 03:43 AM
Validation problem for form_upload - by El Forum - 01-02-2008, 04:25 AM
Validation problem for form_upload - by El Forum - 01-02-2008, 09:36 PM
Validation problem for form_upload - by El Forum - 01-02-2008, 10:05 PM
Validation problem for form_upload - by El Forum - 01-02-2008, 10:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB