Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: trim|valid_email not working in validation
Post: RE: trim|valid_email not working in validation

XtreemDeveloper Wrote: (01-08-2018, 11:37 PM) -- Firstly load form_validation library after that use set_rules Check this code for valid email $this->load->library('form_validation'); $this-...
18,713 Views
15 Replies
01-09-2018, 12:05 AM
040mag
    Thread: trim|valid_email not working in validation
Post: RE: trim|valid_email not working in validation

OK, I'll manage. Thanks Narf!
18,713 Views
15 Replies
01-08-2018, 09:08 AM
040mag
    Thread: trim|valid_email not working in validation
Post: RE: trim|valid_email not working in validation

OK that explains it. To me, however this should be more clear in the documentation. It is not obvious that native PHP functions wont work on the data I specify with the set_data() method. Anyway, than...
18,713 Views
15 Replies
01-08-2018, 07:27 AM
040mag
    Thread: trim|valid_email not working in validation
Post: RE: trim|valid_email not working in validation

First I copy some input variables from a submitted form: PHP Code: -- $this->data['item']['xname'] = $this->input->post('xname'); $this->data['item']['xemail'] = $this->input->post('xemail'); -- T...
18,713 Views
15 Replies
01-08-2018, 05:04 AM
040mag
    Thread: trim|valid_email not working in validation
Post: RE: trim|valid_email not working in validation

Narf Wrote: (01-08-2018, 02:03 AM) -- On which CI version is this? -- I am on 3.1.6 My understanding is that the fix should come out with 3.2. And I was wrong in my first post. Trim didn't work in ...
18,713 Views
15 Replies
01-08-2018, 02:30 AM
040mag
    Thread: trim|valid_email not working in validation
Post: RE: trim|valid_email not working in validation

InsiteFX Wrote: (01-07-2018, 07:44 PM) -- Yes, but you are using quotes for the set_rules label field PHP Code: -- $this->form_validation->set_rules('xname','Xname','trim|required'); $this->form...
18,713 Views
15 Replies
01-08-2018, 01:57 AM
040mag
    Thread: trim|valid_email not working in validation
Post: RE: trim|valid_email not working in validation

But trim is used with set_rules(). See manual here: https://codeigniter.com/user_guide/libraries/form_validation.html?highlight=form_validation#prepping-data
18,713 Views
15 Replies
01-07-2018, 12:50 PM
040mag
    Thread: trim|valid_email not working in validation
Post: RE: trim|valid_email not working in validation

InsiteFX Wrote: (01-07-2018, 12:21 PM) -- Use php's trim method before inserting into the database. You are doing the set_rules wrong, there  is no trim in set_rules. PHP Code: -- set_rules($fiel...
18,713 Views
15 Replies
01-07-2018, 12:48 PM
040mag
    Thread: trim|valid_email not working in validation
Post: trim|valid_email not working in validation

PHP Code: -- $this->form_validation->set_rules('xname','','trim|required'); $this->form_validation->set_rules('xemail','','trim|valid_email'); -- Hi, in the above code the first line is trimming '...
18,713 Views
15 Replies
01-07-2018, 04:34 AM
040mag
    Thread: use of $this
Post: RE: use of $this

Narf Wrote: (12-02-2016, 08:40 AM) -- If you want to use inheritance - that's its whole purpose. It can be argued whether inheritance is good in the first place, but since you pretty much can't ge...
5,591 Views
3 Replies
12-03-2016, 03:23 AM
040mag

Theme © iAndrew 2016 - Forum software by © MyBB