dominionenterprises/filter-php — pull request #38 by chadicus (2014-06-05 12:25:41+00:00)
Title: Add email filter

For some cases it is good enough to just call `filter_var` in the filter spec like this:

```php
$filters = ['email' => [['filter_var', FILTER_VALIDATE_EMAIL]];
```

However `filter_var` will return `false` on failure which means you must do a follow up call to either check for the false value or add a `string` filter after the `filter_var` call like this:

```php
$filters = ['email' => [['filter_var', FILTER_VALIDATE_EMAIL], ['string']];
```

This will result in an error messages saying `false` is not a string. which is not a very descriptive error for an invalid email.