Added test for exception message for validate method

- Test case for https://github.com/rails/rails/pull/16851