Does WhatsApp work without a SIM card? In my Moto G5, I can still use WhatsApp after removing the SIM card, after I successfully validated my phone number.

Would this method work in an iPhone?
Yes, a Sim Card is not required to use Whatsapp. Whatsapp doesn't use your network provider to function as text messages do. Text messages require a Sim Card to recieve the message to your phone number.


  A SIM, or Subscriber Identity Module, card is a computer chip inside a cell phone which identifies your device to your service provider. SIM cards can contain up to 128 KB of memory to store things like contacts, phone numbers, text messages, data usage and billing information.


(Source)

Whereas, Whatsapp doesn't use your phone number to receive messages. It uses your phone number to make an account to which messages can be sent and received.

If you are setting up an account with the phone with no Sim, make sure you have your Sim in to receive the verification code.


  You can now use WhatsApp on devices without a SIM card. All you need is a SIM card and a phone number that is not registered on WhatApp to install the app. Once your WhatsApp account is activated, you can continue using it on other devices without the SIM card.


(Source)