'url', ); /** * @var \Zend\Validator\ValidatorInterface */ protected $validator; /** * Get validator * * @return \Zend\Validator\ValidatorInterface */ public function getValidator() { if (null === $this->validator) { $this->validator = new UriValidator(array( 'allowAbsolute' => true, 'allowRelative' => false, )); } return $this->validator; } /** * Provide default input rules for this element * * Attaches an uri validator. * * @return array */ public function getInputSpecification() { return array( 'name' => $this->getName(), 'required' => true, 'filters' => array( array('name' => 'Zend\Filter\StringTrim'), ), 'validators' => array( $this->getValidator(), ), ); } }