-2

j'utilise la librairie respect\validation

pour checker l'email() https://respect-validation.readthedocs.io/en/latest/rules/Email/

v::email()->validate('alexandre@gaigalas.net'); // true

mais seulement si on ne précise pas le .net ça fonctionne quand même !!

v::email()->validate('alexandre@gaigalas'); // true

je cherche une solution, merci

Dyyyy
  • 17
  • 1
  • 1
    That is because `alexandre@gaigalas` is a valid email address, it is an address of the TLD (top level domain) `gaigalas`. The fact that this TLD doesn't exist is not checked. Please write your questions in English. – KIKO Software Apr 24 '19 at 08:34
  • thanks, how to check if the domain really exists with this library – Dyyyy Apr 24 '19 at 08:47
  • Please edit your question so that it is in English (http://stackoverflow.blog/2009/07/23/non-english-question-policy) – Andreas Apr 24 '19 at 09:00

1 Answers1

2

it's ok

i use

v::filterVar(FILTER_VALIDATE_EMAIL)->validate('alexandre@gaigalas');// false   
Dyyyy
  • 17
  • 1