added validation2, NEXT DO GRPCURL TESTING OF THE VALIDATIONS
This commit is contained in:
@@ -22,7 +22,7 @@ message FieldValidation {
|
|||||||
// Current: only CharacterLimits. More rules can be added later.
|
// Current: only CharacterLimits. More rules can be added later.
|
||||||
CharacterLimits limits = 10;
|
CharacterLimits limits = 10;
|
||||||
// Future expansion:
|
// Future expansion:
|
||||||
// PatternRules pattern = 11;
|
PatternRules pattern = 11; // Validation 2
|
||||||
DisplayMask mask = 3;
|
DisplayMask mask = 3;
|
||||||
// ExternalValidation external = 13;
|
// ExternalValidation external = 13;
|
||||||
// CustomFormatter formatter = 14;
|
// CustomFormatter formatter = 14;
|
||||||
@@ -57,6 +57,31 @@ message DisplayMask {
|
|||||||
optional string template_char = 3; // e.g., "_"
|
optional string template_char = 3; // e.g., "_"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// One position‑based validation rule, similar to CharacterFilter + PositionRange
|
||||||
|
message PatternRule {
|
||||||
|
// Range descriptor: how far the rule applies
|
||||||
|
// Examples:
|
||||||
|
// - "0" → Single position 0
|
||||||
|
// - "0-3" → Range 0..3 inclusive
|
||||||
|
// - "from:5" → From position 5 onward
|
||||||
|
// - "0,2,5" → Multiple discrete positions
|
||||||
|
string range = 1;
|
||||||
|
|
||||||
|
// Character filter type, case‑insensitive keywords:
|
||||||
|
// "ALPHABETIC", "NUMERIC", "ALPHANUMERIC",
|
||||||
|
// "ONEOF(<chars>)", "EXACT(:)", "CUSTOM(<name>)"
|
||||||
|
string filter = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Collection of pattern rules for one field
|
||||||
|
message PatternRules {
|
||||||
|
// All rules that make up the validation logic
|
||||||
|
repeated PatternRule rules = 1;
|
||||||
|
|
||||||
|
// Optional human‑readable description for UI/debug purposes
|
||||||
|
optional string description = 2;
|
||||||
|
}
|
||||||
|
|
||||||
// Service to fetch validations for a table
|
// Service to fetch validations for a table
|
||||||
service TableValidationService {
|
service TableValidationService {
|
||||||
rpc GetTableValidation(GetTableValidationRequest)
|
rpc GetTableValidation(GetTableValidationRequest)
|
||||||
|
|||||||
Reference in New Issue
Block a user