# Change log ## 2.4.3 (2020-03-05) * Only dup hashes and arrays but not the values when creating the modified datastructure that is returned by `validate!`. ## 2.4.2 (2019-11-05) ### Bug fixes * The object validator, if given no classes, now supports any object of classes that derive from `BasicObject`. This allows you to specify types that reside out of the ruby standard library, such as `Tempfile`. ## 2.4.1 (2019-10-28) ### Bug fixes * Re-format code to comply with rubocop. There are no functional implications. ## 2.4.0 (2019-10-28) ### New features * Add support for default values * Add support for type casting ### Bug fixes * Change order of built-in validators so that `Integer` and `String` come *before* `Number` which matches both. ### Changes ## 2.3.2 (2019-09-26) ### New features * Add ability to return custom error messages from `:check` blocks ## 2.3.1 (2019-08-19) ### Changes * Make compatible with Rails 6 ## 2.3.0 (2017-05-18) ### New features * Option `strict` for the Type `:object` This option, which defaults to true, ensures that instance classes are checked strictly. If set to false, instances of derived classes are also allowed. ### Bug fixes * Removed '/root' from the paths in the error messages ### Changes * Added tests for the Collector paths to ensure correct behavior * Added symbol Type to the short forms test ## 2.2.0 (2017-05-17) ### Changes * Handle `ActiveSupport::HashWithIndifferentAccess` objects gracefully when performing the validation. This allows the user to specify the schema using a mixture of symbols and strings, but during the validation of a `HashWithIndifferentAccess` it transparently converts the keys, both in the schema and in the hash, to symbols. In the event that a key is defined both in the string and symbol version, Schemacop expects a Ruby hash and will throw a ValidationError otherwise. ## 2.1.0 (2017-05-16) ### New features * Validator for type Symbol, accessible with the symbol `:symbol` ## 2.0.0 (2017-05-15) ### Changes * Completely rewritten the schema specification, breaking backwards compatibility with version 1.x * Added tons of unit tests ## 1.0.1 (2016-06-07) ### Bug fixes * Fixed bug which didn't allow unspecified hash contents * Fixed bug which didn't allow mixed array type specifications ## 1.0.0 (2016-06-06) * Initial stable release