summaryrefslogtreecommitdiff
path: root/classes/Profile.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-05-20 17:01:19 -0400
committerEvan Prodromou <evan@prodromou.name>2008-05-20 17:01:19 -0400
commite1f04061b9ea1261ed8805ee52cd8764fe4d9494 (patch)
tree911b5765fe3cef289aa865ef55c7c1db87fdc7ff /classes/Profile.php
parent8fcce85864d5f8f7ad9b54317dc62bf330405de2 (diff)
ease up on the validation
darcs-hash:20080520210119-84dde-a9b74a933bd45b2e6b2f96a53a1be55caa0f7912.gz
Diffstat (limited to 'classes/Profile.php')
-rw-r--r--classes/Profile.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/classes/Profile.php b/classes/Profile.php
index 650b44244..d91bcf3ed 100644
--- a/classes/Profile.php
+++ b/classes/Profile.php
@@ -83,22 +83,19 @@ class Profile extends DB_DataObject
}
function validateHomepage() {
- return (is_null($this->homepage) ||
- Validate::uri($this->homepage, array('allowed_schemes' => array('http', 'https'))));
+ return (strlen($this->homepage) == 0) ||
+ Validate::uri($this->homepage, array('allowed_schemes' => array('http', 'https'))));
}
function validateBio() {
- return is_null($this->bio) ||
- Validate::string($this->bio, array('min_length' => 1, 'max_length' => 140));
+ return Validate::string($this->bio, array('min_length' => 0, 'max_length' => 140));
}
function validateLocation() {
- return is_null($this->location) ||
- Validate::string($this->location, array('min_length' => 1, 'max_length' => 255));
+ return Validate::string($this->location, array('min_length' => 0, 'max_length' => 255));
}
function validateFullname() {
- return is_null($this->fullname) ||
- Validate::string($this->fullname, array('min_length' => 1, 'max_length' => 255));
+ return Validate::string($this->fullname, array('min_length' => 0, 'max_length' => 255));
}
}