forked from kami-soft/ProtoBufGenerator
-
Notifications
You must be signed in to change notification settings - Fork 3
Validation methods #14
Copy link
Copy link
Open
Labels
anchestorsenhancementNew feature or requestNew feature or requestgeneratorissues applying to the code generatorissues applying to the code generator
Metadata
Metadata
Assignees
Labels
anchestorsenhancementNew feature or requestNew feature or requestgeneratorissues applying to the code generatorissues applying to the code generator
Right now AllRequiredFieldsValid is called after LoadFromBuf and before SaveToBuf in the anchestor class.
If one tries to avoid required fields however (see https://developers.google.com/protocol-buffers/docs/proto#specifying-field-rules) and want's to implement it's own validation, it would be nice if the anchestor defined some sort of validation method and that the generator overrides this and calls it for all child messages which have a value. AllRequiredFieldsValid should be incorporated there as well, so that there's only one validation mechanism.