I have read all other questions, including everything on google. There’s no visible difference between this one and the same method I’m using for register.
It’s a very basic concept that doesn’t want to work.
Doing a dump of $_POST shows the correct empty string, so something else is going wrong somewhere.
Controller
public function details(){
$this->load->library('form_validation');
//$this->form_validation->set_message('current-password', 'Incorrect password');
$this->form_validation->set_rules('current-password', 'Password', 'required');
$this->load->view('details', $data);
}
View
<?php echo validation_errors(); ?>
<?php echo form_open('user/details'); ?>
<input type="password" name="current-password" id="current-password" value=""/>
<input type="submit" class="submit-save" value="save"/>
</form>
You forgot to actually run the form validation:
See here: http://codeigniter.com/user_guide/libraries/form_validation.html#tutorial