Overview

Namespaces

  • Faulancer
    • Controller
    • Exception
    • Form
      • Validator
        • Type
    • Helper
      • Reflection
    • Http
    • Mail
    • ORM
      • User
    • Service
      • Factory
    • ServiceLocator
    • Session
    • View
      • Helper

Classes

  • DateTime
  • Email
  • Image
  • Number
  • Text
  • Overview
  • Namespace
  • Class
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 
<?php
/**
 * Class Email | Email.php
 * @package Faulancer\Form\Validator\Type
 */
namespace Faulancer\Form\Validator\Type;

use Faulancer\Form\Validator\AbstractValidator;

/**
 * Class Email
 */
class Email extends AbstractValidator
{

    /**
     * The error message as key for translation
     * @var string
     */
    protected $errorMessage = 'validator_invalid_email';

    /**
     * Validate email with filter_var
     * @param $data
     * @return boolean
     */
    public function process($data)
    {
        return !!filter_var($data, FILTER_VALIDATE_EMAIL);
    }

}
API documentation generated by ApiGen