Changed validator to return object not array