added method to extract error messages from validation result and return...

... them as a ruby hash