A
A
Alexander Shirobokov2014-07-17 08:10:47
Yii
Alexander Shirobokov, 2014-07-17 08:10:47

How to check email validity using Yii2?

Actually the question is in the title.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Entelis, 2014-07-17
@DmitriyEntelis

docs.mirocow.com/doku.php?id=yii2:start

$email = '[email protected]';
$validator = new yii\validators\EmailValidator();
if ($validator->validate($email, $error)) {
    echo 'Email is valid.';
} else {
    echo $error;
}

P
Puma Thailand, 2014-07-17
@opium

write your question in google?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question