Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.x] add toBeEmailAddress() expectation #982

Closed

Conversation

JonPurvis
Copy link
Contributor

What:

  • Bug Fix
  • New Feature

Description:

This PR adds a toBeEmailAddress() Expectation, to validate a value is an email address.

<?php

it ('ensures the email of the user is actually an email', function () {
    expect($user->email)->toBeEmailAddress();
});

@devajmeireles
Copy link
Member

devajmeireles commented Oct 14, 2023

Hey, @JonPurvis ! Thanks for your PR.

Although it seems useful, I would disagree with this PR. 👎🏻

I know you may have invested time on this PR, I'm sorry about that, but this PR sets a huge precedent for other validations, which differs from Pest's focus at the moment.

Feel free to submit other PRs based on your suggestion whenever you like.

@JonPurvis
Copy link
Contributor Author

Hey @devajmeireles 👋

Thanks for taking a look! I'm not sure I follow though. This PR is pretty similar to the isURL() Expectation, which was merged and released sometime last week. The only difference is, this is checking email addresses rather than URLs.

Please could you elaborate on:

this PR sets a huge precedent for other validations

Thanks!

@JonPurvis
Copy link
Contributor Author

Hey @devajmeireles

Just a polite bump to check in on your thoughts on this PR 😄

@JonPurvis
Copy link
Contributor Author

Hey @devajmeireles

Another bump on this please. If you could find the time, can you please elaborate on your points made last month?

Thanks

@devajmeireles devajmeireles changed the title add toBeEmailAddress() expectation [2.x] add toBeEmailAddress() expectation Nov 16, 2023
@devajmeireles
Copy link
Member

Hey @devajmeireles

Another bump on this please. If you could find the time, can you please elaborate on your points made last month?

Thanks

Nevermind.

@nunomaduro
Copy link
Member

No plans for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants