Closed gaelian closed 10 years ago
After a bit more looking, I noticed that the Validatable::validate
method was already checking to see if validation_type
was an empty hash, but not checking to see whether it was in fact a hash in the first place. It seemed to follow fairly logically that Validatable::validate
should check whether validation_type
is a Hash as well and then error out appropriately in the negative case. The included spec update covers this change.
I've also updated your README as discussed.
Great! Thanks.
The
Validatable::validate
class method now not only guards against thevalidation_type
argument being an empty hash, but also makes sure thatvalidation_type
is in fact a hash as well. In either event, an exception is raised and a useful error message is displayed. Updated relevant spec.The README now describes validation syntax correctly and a little more explicitly.
Closes #106.