/** * Validates mobile phone number * * @return bool */ protected function _validateMobile() { if (!strlen($this->_job->getMobile()) && strlen($this->_job->getPhone())) { return true; } $validator = new Zend_Validate_StringLength(8, 25); if ($validator->isValid($this->_job->getMobile())) { return true; } $msg = Sanmax_MessageStack::getInstance('SxCms_Job'); $msg->addMessage('mobile', $validator->getMessages(), 'location'); return false; }