예제 #1
0
파일: Email.php 프로젝트: anunay/stentors
 /**
  * Class constructor.
  * Set the value of the pattern and validate the email.
  *
  * @param  string $regexp <Optional> Regular expression to validate the value.
  *
  * @return void
  */
 public function __construct($regexp = "")
 {
     if (!empty($regexp)) {
         $this->_pattern = $regexp;
     }
     parent::__construct($this->_pattern);
 }
예제 #2
0
파일: UUID.php 프로젝트: sdis62/toolbox
 /**
  * On appel le constructeur de Zend_Validate_Regex pour faire correspondre le regex à un UUID
  */
 public function __construct()
 {
     parent::__construct(array('pattern' => '/([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})/'));
 }
예제 #3
0
 /**
  * Overwrite the constructor to make the pattern parameter optional.
  * @param string $pattern
  */
 public function __construct($pattern = null)
 {
     if (null !== $pattern) {
         parent::__construct($pattern);
     }
 }
예제 #4
0
파일: Phone.php 프로젝트: GemsTracker/MUtil
 /**
  * Sets validator options
  *
  * @param  string|\Zend_Config $pattern
  * @return void
  */
 public function __construct($pattern = self::PHONE_REGEX)
 {
     parent::__construct($pattern);
 }
예제 #5
0
 public function __construct($pattern)
 {
     $pattern['pattern'] = '/^([a-z0-9]+)([\\-+._][a-z0-9]+)*@([a-z0-9][\\-a-z0-9]*\\.){1,5}([a-z]){2,6}$/i';
     parent::__construct($pattern);
 }
예제 #6
0
 /**
  * Sets validator options
  *
  * @param  string|\Zend_Config $pattern
  * @return void
  */
 public function __construct($pattern = self::EMAILS_REGEX)
 {
     parent::__construct($pattern);
 }