Reduce complexity in validates_by_schema