cakephp/cakephp — pull request #890 by dereuromark (2012-10-05 11:24:50+00:00)
Title: fix validation error domain for notEmpty

see http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/3176-default-validation-message

I just run into the same issue upgrading a 1.3 app to 2.x

public $validate = array(
'firstname' => array('notEmpty'),
'lastname' => array('notEmpty'),
);
worked just fine in 1.x and translated the rule "notEmpty" via po file and "This field cannot be left blank" (eng) to "Plichtfeld" (deu).
With 2.x the returned message stays "This field cannot be left blank" (not translated).
so if we allow the flat (simple) array, we should make sure the rule gets not only the correct message but also the translated one.
I think the main issue is that it should NOT be the cake_dev domain:

$message = __d('cake_dev', 'This field cannot be left blank');
but

$message = __d('cake', 'This field cannot be left blank');
since it is user land code relevant and visible to the outside.