Validate
Input validation
Field | Type | Default | Unit |
---|---|---|---|
number |
- |
- |
|
See description at the messages above! |
|||
string |
- |
- |
|
bytes |
- |
- |
|
repeated |
- |
- |
|
map |
- |
- |
|
path |
string |
- |
- |
path to the (sub message) child field the validation shall be enforced (cf. path of a protobuf FieldMask: https://protobuf.dev/reference/java/api-docs/com/google/protobuf/FieldMask.html) |
|||
optional |
bool |
- |
- |
This field is optional if set to True |
Number Rules
Number validation. Can be applied for all numbers (float, double, int32, int64, uint32, etc.) for values between -16777216 and +16777216
Field | Type | Default | Unit |
---|---|---|---|
greater |
double |
- |
- |
target value has to be "Greater Than" |
|||
greater_or_equal |
double |
- |
- |
target value has to be "Greater Than or Equal" |
|||
less |
double |
- |
- |
target value has to be "Less Than" |
|||
less_or_equal |
double |
- |
- |
target value has to be "Less Than or Equal" |
String Rules
String validation
Field | Type | Default | Unit |
---|---|---|---|
minimum |
uint32 |
- |
- |
minimal number of required characters |
|||
maximum |
uint32 |
- |
- |
maximal number of allowed characters |
|||
startswith |
string |
- |
- |
string has to start with this string (case sensitive) |
|||
endswith |
string |
- |
- |
string has to start with this string (case sensitive) |
|||
contains |
string |
- |
- |
string has to start with this string (case sensitive) |
|||
pattern |
string |
- |
- |
string has to match this regex pattern. The following regex match method is used: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match |
Bytes Rules
Byte validation
Field | Type | Default | Unit |
---|---|---|---|
minimum |
uint32 |
- |
- |
minimal number of required bytes |
|||
maximum |
uint32 |
- |
- |
maximal number of allowed bytes |
Repeated Rules
Repeated validation: Apply only to repeated fields
Field | Type | Default | Unit |
---|---|---|---|
minimum |
uint64 |
- |
- |
minimal number of repeated list elements |
|||
maximum |
uint64 |
- |
- |
maximal number of repeated list elements |
Map Rules
Map validation: Apply only to map fields
Field | Type | Default | Unit |
---|---|---|---|
minimum |
uint64 |
- |
- |
minimal number of key-value pairs |
|||
maximum |
uint64 |
- |
- |
maximal number of key-value pairs |
|||
keys |
- |
- |
|
(recursive) Validate definition for keys |
|||
values |
- |
- |
|
(recursive) Validate definition for values |