[eluser]OverZealous[/eluser]
@warrnennz
Second things first:
Do not
include the DataMapper model in the DME class. Simply create the DataMapperExt class as a model (NOT as a library). Load the DataMapper library like normal, through the autoloader (and do not load the DataMapperExt at all, as DataMapper will load DME automatically). Also, make sure you don't load
any models, as DataMapper loads all of the models automatically, and including anything in the models will just duplicate the loading of classes (and, possibly, cause bugs).
You should not get any errors with DataMapper unless you try to instantiate DataMapperExt — which you also should never do.
Also, this might help, but don't use parent:
ataMapper (or parent:
ataMapperExt). Instead, create the constructor using standard PHP constructors:
Code:
function __construct() {
parent::__construct();
}
This is how mine is, and I know it works without errors.
The 'matches' problem:
I don't know why you are having trouble with the example given. You might want to try doing some debugging first. The only difference between the example you gave and mine is that I include 'trim', and an 'encrypt' function (as recommended in the instructions). Also, as I said before, if you do not manually check for 'required' (and do not include the 'required' validation rule), the 'confirm_password' field will always pass when empty().
Please try to debug by adding some
echo()s to the DataMapper validation code, to see what's going on.