summaryrefslogtreecommitdiff
path: root/classes/Avatar.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/Avatar.php')
-rw-r--r--classes/Avatar.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/classes/Avatar.php b/classes/Avatar.php
index 2e0e1f3fb..57e0d2fa8 100644
--- a/classes/Avatar.php
+++ b/classes/Avatar.php
@@ -25,4 +25,16 @@ class Avatar extends DB_DataObject
/* 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')));
+ }
}