Open
Description
protobuf.js version: 6.7.3
If I use MyMessage.fromObject({'myEnum': 'invalid'})
I would expect the function to fail in case invalid
is not one of the possible options for the enum. Current behavior just ignores the field and doesn't add anything into the resulting MyMessage
instance.
enum MyEnum {
VAL1 = 0;
VAL2 = 1;
}
message MyMessage {
string id = 1;
MyEnum myEnum = 2;
}
MyMessage.fromObject({'myEnum': 'invalid', id: "22"}) // returns {id: "22"} which is valid