valid? method should validate child messages when present #14

rhettc opened this Issue Oct 27, 2011 · 1 comment


None yet

2 participants

rhettc commented Oct 27, 2011


message Foo {
required int32 id = 1;
optional Bar bar =2;

message Bar {
required int32 = 1;

f = = 300
f.valid? # true (as expected)
b = = b
f.valid? #true (but should be false since f cannot be encoded)

Perhaps an alternative would be to indicate which message type failed validation when encoding.



Yeah, valid? needs to modified to be recursive to sub-messages. Clearer encoding errors would be great too.

@codekitchen codekitchen added a commit that closed this issue Apr 25, 2012
@codekitchen codekitchen validate sub-messages
fixes #14
@kb kb added a commit to crashlytics/ruby-protocol-buffers that referenced this issue Jun 25, 2013
@codekitchen codekitchen validate sub-messages
fixes #14
@jwroblewski jwroblewski pushed a commit to liquidm/ruby-protocol-buffers that referenced this issue Jan 11, 2014
@codekitchen codekitchen add license summary to gemfile
closes #14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment