From c863544ec39da4f39e30cf28ea4972c0ad1e3923 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 17 Jan 2010 19:31:49 -0800 Subject: Add validation for guest_email and guest_url. --- modules/comment/models/comment.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'modules/comment/models') diff --git a/modules/comment/models/comment.php b/modules/comment/models/comment.php index 891ffbce..69b8505e 100644 --- a/modules/comment/models/comment.php +++ b/modules/comment/models/comment.php @@ -60,10 +60,12 @@ class Comment_Model extends ORM { // validate() is recursive, only modify the rules on the outermost call. if (!$array) { $this->rules = array( - "guest_name" => array("callbacks" => array(array($this, "valid_author"))), - "item_id" => array("callbacks" => array(array($this, "valid_item"))), - "state" => array("rules" => array("Comment_Model::valid_state")), - "text" => array("rules" => array("required")), + "guest_name" => array("callbacks" => array(array($this, "valid_author"))), + "guest_email" => array("rules" => array("email")), + "guest_url" => array("rules" => array("url")), + "item_id" => array("callbacks" => array(array($this, "valid_item"))), + "state" => array("rules" => array("Comment_Model::valid_state")), + "text" => array("rules" => array("required")), ); } -- cgit v1.2.3