RPath - validation implemented

includes first cut at validation function