Add upstream plugins

Signed-off-by: Adrian Nöthlich <git@promasu.tech>
This commit is contained in:
2019-10-25 22:42:20 +02:00
parent 5d3c2ec184
commit 290736650a
1186 changed files with 302577 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
/**
* Email validator.
*
* @author Time.ly Network Inc.
* @since 2.3
* @instantiator new
* @package AI1EC
* @subpackage AI1EC.Validator
*/
class Ai1ec_Validator_Email extends Ai1ec_Validator {
/* (non-PHPdoc)
* @see Ai1ec_Validator::validate()
*/
public function validate() {
if (
! empty( $this->_value ) &&
! is_email( $this->_value )
) {
throw new Ai1ec_Value_Not_Valid_Exception();
}
return $this->_value;
}
}