validators/tel.php
Go to the documentation of this file.
1 <?php
6 namespace depage\htmlform\validators;
7 
11 class tel extends regEx
12 {
21  public function __construct($log = null)
22  {
23  parent::__construct($log);
24 
25  $this->regEx = '/^[0-9\/\(\)\+\-\. ]*$/';
26  }
27 
36  public function getPatternAttribute()
37  {
38  return '';
39  }
40 }
customizable validator for input elements
Definition: regEx.php:11
__construct($log=null)
tel valdiator class constructor
default validator for tel input elements
getPatternAttribute()
returns HTML5 pattern attribute