i had a membership form
with user creating new member with their new password.
so in the form will have Password and Confirm Password field.
in add form, they are working fine
but when it come to edit
Confirm password always not match with Password, although i had clearly input the correct for both fields.
if($crud->getState() == "edit") { $crud->field_type('Username', 'readonly'); $crud->callback_edit_field('Password', function($value){ return '<input type="password" maxlength="128" value="" name="Password" class="form-control" id="field-Password">'; }); } if($crud->getState() == "insert_validation") { $crud->set_rules('Password', 'Password', 'required'); $crud->set_rules("CPassword", 'Confirm Password', "trim|required|matches[Password]"); } else if($crud->getState() == "update_validation") { $crud->set_rules("CPassword", 'Confirm Password', "matches[Password]"); }
any advices ?
Thanks.