I'm not sure about text messaging. But in the call log you can tap and hold, it will provide option to add that number to the rejection list.
That's what I normally do for numbers, as for texts.. I'm not sure if adding a number to the rejection list will apply to text as well..
Sent from my SAMSUNG-SM-N900A using Tapatalk