fixing typo in DataMapper and adding rulesregistry to validator factory