It is actually possible. I have multiple numbers blocked that way. I get a lot of wrong numbers for some reason.
Basically, if the person sending the text is not in your contacts list, iPhone will block it?
You are able to block people from texting you? How did you do this?
In Messages, go to the conversation with the person you want to block. Go to Contact at the top right. Hit i. Scroll down and block.
Re-read the OP's post. He is looking for a white list. If the person is not in that list then no text is received. This is not currently possible.
Currently there is only a blocked list, not a white list.
Oh, my bad. Yeah, that's a no go.