summaryrefslogtreecommitdiff
path: root/modules/comment/models/comment.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-17 19:31:49 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-17 19:31:49 -0800
commitc863544ec39da4f39e30cf28ea4972c0ad1e3923 (patch)
tree13ad6153ab6688a7cfbdea1a77750a109235960b /modules/comment/models/comment.php
parentf68862f4c9a595cfd84e844e85339f7ed82c6c1a (diff)
Add validation for guest_email and guest_url.
Diffstat (limited to 'modules/comment/models/comment.php')
-rw-r--r--modules/comment/models/comment.php10
1 files changed, 6 insertions, 4 deletions
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")),
);
}