Validation

Add validation rules for message fields:

validation_service.proto
1syntax = "proto3";
2
3package userservice.v1;
4
5message CreateUserRequest {
6 string email = 1 [
7 (x_fern_validation) = '{
8 "format": "email",
9 "required": true
10 }'
11 ];
12
13 string name = 2 [
14 (x_fern_validation) = '{
15 "min_length": 1,
16 "max_length": 100,
17 "required": true
18 }'
19 ];
20
21 int32 age = 3 [
22 (x_fern_validation) = '{
23 "minimum": 0,
24 "maximum": 120
25 }'
26 ];
27}