馃摚 Add Custom Validate Constraints to StartModuleRequest
馃摑 Issue Description
In the proto file digitalkin/module/v1/lifecycle.proto, within the StartModuleRequest message, we need to add custom validate constraints as described in Buf's custom constraints documentation. This is to ensure the content is validated based on the request_type, which will help prevent errors and assist the user in understanding what went wrong. Below is an example of a custom constraint:
message Event {
int64 start_time = 1;
int64 end_time = 2;
option (buf.validate.message).cel = {
id: "event.start_time_before_end_time",
message: "Start time must be before end time",
expression: "this.start_time < this.end_time",
};
}
馃殌 Objective
To implement custom validation constraints in the StartModuleRequest message to ensure the content is appropriately validated based on the request_type.
馃悶 Problem Reproduction
- Open the proto file
digitalkin/module/v1/lifecycle.proto.
- Locate the
StartModuleRequest message.
- Observe the lack of custom validation constraints on the
content field.
- Note that without these constraints, users may encounter errors without clear guidance.
馃挵 Business Outcome
Implementing this task will reduce user errors and improve the user experience by providing clearer validation messages, potentially reducing support requests and increasing user satisfaction.
馃摑 Task List
馃挕 Potential Solution
Refer to the example provided and the Buf custom constraints documentation to implement the necessary validation logic.
馃搱 Priority
Low 馃挙
馃摚 Add Custom Validate Constraints to StartModuleRequest
馃摑 Issue Description
In the proto file
digitalkin/module/v1/lifecycle.proto, within theStartModuleRequestmessage, we need to add custom validate constraints as described in Buf's custom constraints documentation. This is to ensure thecontentis validated based on therequest_type, which will help prevent errors and assist the user in understanding what went wrong. Below is an example of a custom constraint:馃殌 Objective
To implement custom validation constraints in the
StartModuleRequestmessage to ensure thecontentis appropriately validated based on therequest_type.馃悶 Problem Reproduction
digitalkin/module/v1/lifecycle.proto.StartModuleRequestmessage.contentfield.馃挵 Business Outcome
Implementing this task will reduce user errors and improve the user experience by providing clearer validation messages, potentially reducing support requests and increasing user satisfaction.
馃摑 Task List
StartModuleRequestmessage indigitalkin/module/v1/lifecycle.proto.contentfield based onrequest_type.馃挕 Potential Solution
Refer to the example provided and the Buf custom constraints documentation to implement the necessary validation logic.
馃搱 Priority
Low 馃挙