Welcome Guest, Not a member yet? Register   Sign In
add/edit validation with an Object
#4

[eluser]ericsodt[/eluser]
[quote author="alpar" date="1191285527"]you can set up values directly to the validation object. something like: $this->validation->value = $this->event->value; you can use a foreach if you named all values the same, as in the example.[/quote]

Where would I do this? I would think in the controller, but where?
Code:
$rules['displayName']         = "required";
            $rules['eventLocation']     = "required";
            $rules['desc']                 = "required";
            $rules['email']             = "required|valid_email";
            $rules['startDate']         = "required";
            $rules['endDate']            = "required";        
            
            $this->validation->set_rules($rules);        
            
            $fields['displayName']         = 'Host Name';
            $fields['eventLocation']     = 'Event Location';
            $fields['desc']             = 'Event Description';
            $fields['email']             = 'Email Address';
            $fields['startDate']        = 'Start Date';
            $fields['endDate']            = 'End Date';

This is how I've set my fields. Using this, can you explain what you mean??


Messages In This Thread
add/edit validation with an Object - by El Forum - 09-30-2007, 04:37 PM
add/edit validation with an Object - by El Forum - 10-01-2007, 07:59 AM
add/edit validation with an Object - by El Forum - 10-01-2007, 01:38 PM
add/edit validation with an Object - by El Forum - 10-01-2007, 01:45 PM
add/edit validation with an Object - by El Forum - 10-01-2007, 03:11 PM
add/edit validation with an Object - by El Forum - 10-02-2007, 12:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB