/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
+
+ function validateMediatype() {
+ return Validate::string($this->mediatype, array('min_length' => 1, 'max_length' => 32));
+ }
+
+ function validateFilename() {
+ return Validate::string($this->filename, array('min_length' => 1, 'max_length' => 255));
+ }
+
+ function validateUrl() {
+ return Validate::uri($this->url, array('allowed_schemes' => array('http', 'https')));
+ }
}
}
return $this->profile;
}
+
+ function validateContent() {
+ return Validate::string($this->content, array('min_length' => 1, 'max_length' => 140));
+ }
+
+ function validateUrl() {
+ return is_null($this->url) ||
+ Validate::uri($this->url, array('allowed_schemes' => array('http', 'https')));
+ }
}
return NULL;
}
}
+
+ function validateNickname() {
+ return Validate::string($this->nickname, array('min_length' => 1, 'max_length' => 64,
+ 'format' => VALIDATE_ALPHA_LOWER . VALIDATE_NUM));
+ }
+
+ function validateProfileurl() {
+ return Validate::uri($this->profileurl, array('allowed_schemes' => array('http', 'https')));
+ }
+
+ function validateHomepage() {
+ return (is_null($this->homepage) ||
+ 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));
+ }
+
+ function validateLocation() {
+ return is_null($this->location) ||
+ Validate::string($this->location, array('min_length' => 1, 'max_length' => 255));
+ }
+
+ function validateFullname() {
+ return is_null($this->fullname) ||
+ Validate::string($this->fullname, array('min_length' => 1, 'max_length' => 255));
+ }
}
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
+
+ function validateUrl() {
+ return is_null($this->url) ||
+ Validate::uri($this->url, array('allowed_schemes' => array('http', 'https')));
+ }
}
* Table Definition for user
*/
require_once 'DB/DataObject.php';
+require_once 'Validate.php';
class User extends DB_DataObject
{
$sub->subscribed = $other->id;
return $sub->find();
}
+
+ function validateEmail() {
+ return Validate::email($this->email, true);
+ }
+
+ function validateNickname() {
+ return Validate::string($this->nickname, array('min_length' => 1, 'max_length' => 64,
+ 'format' => VALIDATE_ALPHA_LOWER . VALIDATE_NUM));
+ }
}
--- /dev/null
+This package requires PHP 5.x and the following PHP Pear libraries:
+
+- DB_DataObject
+- Validate
+- XMLWriter
+
- site logo
- instructions
- deal with PHP quotes escaping
+- fix layout of textarea
+- make notices into "big links"
+- fix spacing on notices
+- limit entry in textarea to 140 chars
- release 0.2
- set Last-Modified
- XML sitemap generation