> ## Documentation Index
> Fetch the complete documentation index at: https://www.getmaxim.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# containsValidEmail

> Checks whether a given string contains at least one email address.

## Input

* **`input`**: The original input text or data
* **`output`**: The string to check for email addresses
* **`expectedOutput`**: The expected output to compare against.

<Note>
  - Any of the input variables (`input`, `output`, `expectedOutput`) can be marked as optional.
  - The returned value from the `validate` function can be a boolean, string, or a number.
</Note>

## Output

* **`Result`**: Boolean (`true` or `false`) | string | number

## Interpretation

> Assuming this evaluator returns a boolean

* **true**: One or more valid email addresses were detected
* **false**: No valid email addresses were found

<Note>This evaluator requires a function named <code>validate</code>.</Note>

## Example

```python theme={null}
import re

def validate(input, output, expectedOutput):
    pattern = r'[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+'
    return re.search(pattern, str(output)) is not None
```
