Open peetucket opened 9 years ago
It looks like this gem might fix errors like this downstream:
https://github.com/SchemaPlus/schema_validations
Maybe we should add that to sul-exhibits-template and see how it works? I'm hesitating requiring all spotlight users to use that gem, but maybe we could recommend it in some docs?
:+1: You can also turn off automatic validations by default and then do it by model (if there are models where this automatic behavior is not desired).
I just tried this gem in sul-exhibits-template, and it may be more trouble than it's worth. It seems like it has trouble with value coercion (or, i submitted a form with an optional, blank value, and it complained that it wasn't an integer..) If we want to use them gem, I think we'll have to whitelist the properties we actually care about.
When editing a page, if you add a big blob of text (very long title), and click submit you'll get an exception: