ref.validate function

Checks the validity of ref.resp if given as data frame