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

error in readme.md, usage, advanced example #53

Closed
kcassam opened this issue Mar 4, 2015 · 2 comments
Closed

error in readme.md, usage, advanced example #53

kcassam opened this issue Mar 4, 2015 · 2 comments

Comments

@kcassam
Copy link

kcassam commented Mar 4, 2015

Should be (see // here!)

use Egulias\EmailValidator\EmailValidator;

$validator = new EmailValidator;
$email = 'dominic@sayers.cc';
$result = $validator->isValid($email);

if ($result) {
    echo $email . ' is a valid email address';
// here!
}
if ($validator->hasWarnings()) {
    echo 'Warning! ' . $email . ' has unusual/deprecated features (result code ' . var_export($validator->getWarnings(), true) . ')';
} else {
    echo $email . ' is not a valid email address (result code ' . $validator->getError() . ')';
}
@egulias
Copy link
Owner

egulias commented Mar 24, 2015

Hi @kcassam sorry for my late response.
You are right, but if you modify like that, the else should go with the first if.
I'm thinking of improving the readme, by the way.

@egulias
Copy link
Owner

egulias commented May 10, 2016

Please see #106

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

No branches or pull requests

2 participants