title: Unable to Show error message in cakephp 2.x validations
body: <p>I am developing the simple register form.And develope the model,controller,view classes.but i am unable to show the error messages in my application.</p>
  
  <p><strong>User.php(Model class)</strong></p>
  
  <pre><code>&lt;?php
  class User extends AppModel
  {
   var $name='User';
   public $validate= array(
                  'username'=&gt;array(
                          'rule'=&gt;'notEmpty',
                          'required'=&gt;true,
                          'message'=&gt;'Enter your name'
                  ),
                  'email' =&gt; array(
                          'rule' =&gt; 'notEmpty',
                          'message' =&gt; 'Please enter your email'
                  )
                 );
  }
  ?&gt;
  </code></pre>
  
  <p><strong>UsersController.php</strong></p>
  
  <pre><code>&lt;?php
      class UsersController extends AppController {
  
      public $helpers = array('Html', 'Form');
       array('action' =&gt; 'edit')
      public function register() {
  
              if ($this-&gt;User-&gt;validates()) {
           $this-&gt;User-&gt;set($this-&gt;request-&gt;data);
                  $name = $this-&gt;request-&gt;data['User']['username'];
                  $email = $this-&gt;request-&gt;data['User']['email'];
              }
              else{
              $this-&gt;flash('register fail');
              }
  }
  }
  ?&gt;
  </code></pre>
  
  <p><strong>register.ctp</strong></p>
  
  <pre><code>&lt;?php  
      echo $this-&gt;Form-&gt;create('User',array('action'=&gt;'register')); 
      echo $this-&gt;Form-&gt;input('username'); 
      echo $this-&gt;Form-&gt;input('email');    
      echo $this-&gt;Form-&gt;end('Register');  
   ?&gt;
  </code></pre>
  
  <p>when i am click the register button above code is not showing the error messages.</p>