mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-19 16:19:55 -04:00
Add validation for guest_email and guest_url.
This commit is contained in:
@@ -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")),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user