You aren't using it right. The transaction hasn't failed, the validation has. You need to check the result of the $user->save() call to see if the validation failed. The validation result is also stored in $object->valid.
Transactions are only used to group a series of queries, justlike in normal SQL.[/quote]
Phil,
Could you add a note on this (validation failing and not the transaction) to the docs? I had this exact problem. The example led me to believe that the validation would cause transactions to fail/succeed, and I couldn't figure out why the trans status was NULL instead of true -or- false. This would have saved me at least a day or two of frustration.
Or you could update the example to show how to check for both validation and transaction success. I'm sure j0nxiest and I aren't the only ones to run into this by following the example.
Anyway, great work - I'm loving how DMDMZ simplifies validation and 'array' post variable handling among many other things.