My attempt to implement validation req_keys for hash elements

I am not sure it's correct way to implement this, but I need validate req_keys and so far it works for me.