Override isValid in your form
/** * Validate the form, check passwords. * * @param array $data * @return boolean */ public function isValid($data) { $valid = parent::isValid($data); if ($this->getValue('password') !== $this->getValue('password2')) { $valid = false; $this->password2->addError('Passwords don\'t match.'); } return $valid; } // mods remove this comment text: Edits must be at least 6 characters; is there something else to improve in this post? // All I wanted was to put a slash before one of the single quotes.