Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

226
Visualizações
Address validation in Laravel

I am trying to validate addresses input from users, where they give their street name, zip code, house number etc ...

The question is, how can I validate weather the address is valid?

The even better question would be, how can I check using the IP of the user, weather the input match the current country of the user or not, according to those informations I am gonna flash some validation errors.

Can I implement this in a Google Map for example?

Thanks

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You can't.

There are simply too many edge cases, where addresses might seem wrongful, but are correct. Where I live some companies get their own zip code, also some roads do and some addresses does not have a town name.

If you want to be as precise as possible, you should ask the user to enter their address through a Google Maps auto complete field, as Google Maps knows a lot of the edge cases.

That being said, It's not accurate to check whether the users inputted address matches their origin country, as they can be behind a VPN. Also some IP addresses maps to another country than the user is actually in.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda