• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Proposal: Form_validation request method support

I use the form validation library quite often, and have extended it on several occasions without much trouble. I am currently working on an API server that implements REST. It would be nice to see the following methods added to the form validation library:

$this->form_validation->set_method('get'); // delete, etc.

The method would still default to post.

Secondly, override the standard request method input entirely when dealing with more complex input:

$input = array(
  'item1' => $this->input->get('item1'),
  'item2' => $this->_some_other_source(),

I would be happy to implement the changes and forward them along to a Reactor developer. I am curious to here other thoughts and suggestions.

Added to UserVoice: http://uservoice.com/a/g4EVB

I have attached the proposed change from the most recent Reactor commit. In addition, I have added a result() function to my original proposal:


Returns the resulting data after the validation has been run (to accommodated functions that will manipulate the final result) - primarily used when the input is overridden.

I welcome any feedback.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.