made the validation macro a defn

Edited this function for ralfonso