'tel', ]; /** * @var ValidatorInterface */ protected $validator; /** * Get validator * * @return ValidatorInterface */ protected function getValidator() { if (null === $this->validator) { $this->validator = new RegexValidator("/^[^\r\n]*$/"); } return $this->validator; } /** * Provide default input rules for this element * * @return array */ public function getInputSpecification() { return [ 'name' => $this->getName(), 'required' => true, 'filters' => [ ['name' => StringTrim::class], ['name' => StripNewlines::class], ], 'validators' => [ $this->getValidator(), ], ]; } }