Fixed URI validation and added stub for mongoid validation