commit 67acbfb5a6ac42591b4c6bf3cf2b5fac97b78796
Author: hasse <hasegawa@i-hearts.jp>
Date:   Wed Mar 9 21:07:37 2016 -0500

    パスワード再発行機能実装

diff --git a/app/Model/ContactValidate.php b/app/Model/ContactValidate.php
index ffce6ae..e6b1f95 100755
--- a/app/Model/ContactValidate.php
+++ b/app/Model/ContactValidate.php
@@ -31,26 +31,49 @@ class ContactValidate extends AppModel {
  */
 	public $validate = array(
 		'name' => array(
-			'notblank' => array(
 				'rule' => array('notBlank'),
-				'message' => '入力されていません',
-			),
+                'message' => 'この項目は入力必須です'
 		),
-		'email' => array(
-			'notblank' => array(
+        'email' => array(
+        	array(
 				'rule' => array('notBlank'),
-				'message' => '入力されていません',
-			),
-			'isEmail' => array(
+                'message' => 'メールアドレスを入力してください'
+            ),
+            // メールアドレスであること。
+            'isEmail' => array( 
 				'rule' => 'Email',
-				'message' => '入力形式が正しくありません',
-			),
-		),
-		'comment' => array(
+            	'message' => '正しいメールアドレスを入力してください'
+            ),
+            array(
+                'rule' => 'emailConfirm', 
+                'message' => 'メールアドレスが一致していません'
+            ), 
+        ),
+        'email_confirm' => array(
+            array(
+				'rule' => array('notBlank'),
+                'message' => 'メールアドレス(確認)を入力してください'
+            ), 
+        ),
+
+        'comment' => array(
 			'notblank' => array(
 				'rule' => array('notblank'),
 				'message' => '入力されていません',
 			),
 		),
 	);
+
+
+    public function emailConfirm($check){
+        //２つのパスワードフィールドが一致する事を確認する
+        if($this->data['ContactValidate']['email'] === $this->data['ContactValidate']['email_confirm']){
+            return true;
+        }else{
+            return false;
+        }
+
+    }
+
+
 }
