Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Email validator checkMX constraint - disable in test environment #16819

Copy link
Copy link
Closed
@benr77

Description

@benr77
Issue body actions

When running test suites, I don't want to rely on an internet connection. However, I have defined the checkMX constraint on various email fields, and this does a remote DNS lookup to perform the validation.

Should it not be possible to tell the validator that for the test environment any remote DNS calls should be skipped? Currently some of my tests fail when there is no connectivity due to the MX lookup failing.

I have tried using expression syntax in the validation but this does not appear to work

email:
      - Email:
          message: The email {{ value }} does not seem to be valid.
          checkMX: @=parameter('kernel.environment') == 'test' ? false : true

Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.