diff options
Diffstat (limited to 'classes/Notice.php')
-rw-r--r-- | classes/Notice.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/classes/Notice.php b/classes/Notice.php index 24c813330..3e6835ec9 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -52,4 +52,13 @@ class Notice extends DB_DataObject } 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'))); + } } |