[eluser]SeanJA[/eluser]
Ok, so I have a profile page, and the user has the option to change their password or not, I was trying to use the validation class to do this, but I cannot figure out how to check if the password and confirmed password are the same, only if one of them is set. Is that possible with the validation class? Or would it not be because you need both variables?
[eluser]Nima A.[/eluser]
oh ! I think , it's not a proper example of a FULL STACK framework functionality like CI
the main usage of full stack frameworks (vs. glue) is that it forces a structure for your program, (best solution for team based projects), and supply a foundation and a coding style , although it offers some functionalities such as validation, sending emails, etc ... but it's not the point !
your program may have various conditions and needs, I don't think it's a good choice to think
: " hmm, well I use a framework , so It should handle all of the situations with the help of it"
esp. when you are using FULL STACK frameworks, which means you care about the STRUCTURE of your program, not a utility class or function ,
I'm not interested on these capabilities in my program and prefer to create one (exactly regard to my needs) based on CI structure,
[eluser]ebot[/eluser]
if you wanna validate you can do this:
$this->load->library('validation');
in any function of your choice and then
you have the following:
$rules['password']="password";
$rules['confirm_password']="confirm_password";
use an if-else statement to compare both you mail me back if not i will do some thing complete for and drop ok. call Ebot T.
[eluser]satterle[/eluser]
From the documentation:
$rules['password'] = "required|matches[passconf]";
$rules['passconf'] = "required";
[eluser]Pascal Kriete[/eluser]
Well, it looks like satterie has you sorted.
@magpie that was neither helpful, nor did it relate to his question in any way.