removed formatter for rules

This commit is contained in:
Priec
2026-05-29 12:18:13 +02:00
parent f11c6060ea
commit a05f1f2a1e
11 changed files with 12 additions and 95 deletions

View File

@@ -40,14 +40,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
".komp_ac.table_validation.PatternRules",
"#[derive(serde::Serialize, serde::Deserialize)]",
)
.type_attribute(
".komp_ac.table_validation.CustomFormatter",
"#[derive(serde::Serialize, serde::Deserialize)]",
)
.type_attribute(
".komp_ac.table_validation.FormatterOption",
"#[derive(serde::Serialize, serde::Deserialize)]",
)
.type_attribute(
".komp_ac.table_validation.AllowedValues",
"#[derive(serde::Serialize, serde::Deserialize)]",

View File

@@ -13,7 +13,7 @@ package komp_ac.table_validation;
//
// Important split:
// - limits / pattern / allowed_values / required are validation rules.
// - mask / formatter are presentation and input-shaping metadata for clients.
// - mask is presentation and input-shaping metadata for clients.
// Request validation rules for a table
message GetTableValidationRequest {
@@ -44,9 +44,6 @@ message FieldValidation {
// Client-side hint that this field participates in external/asynchronous validation UI.
bool external_validation_enabled = 13;
// Client-side formatter metadata. This is intentionally data-only, not executable code.
optional CustomFormatter formatter = 14;
// Client-side display mask metadata. The server stores raw data without mask literals.
DisplayMask mask = 3;
@@ -139,22 +136,6 @@ message PatternRule {
CharacterConstraint constraint = 2;
}
// Client-side formatter metadata.
// The formatter "type" is intended to be resolved by a client-side formatter registry.
message CustomFormatter {
// Formatter type identifier; handled clientside.
// Examples: "PSCFormatter", "PhoneFormatter", "CreditCardFormatter", "DateFormatter"
string type = 1;
repeated FormatterOption options = 2;
optional string description = 3;
}
message FormatterOption {
string key = 1;
string value = 2;
}
// Exact-value whitelist configuration.
// This maps to canvas AllowedValues semantics.
message AllowedValues {

Binary file not shown.

View File

@@ -34,9 +34,6 @@ pub struct FieldValidation {
/// Client-side hint that this field participates in external/asynchronous validation UI.
#[prost(bool, tag = "13")]
pub external_validation_enabled: bool,
/// Client-side formatter metadata. This is intentionally data-only, not executable code.
#[prost(message, optional, tag = "14")]
pub formatter: ::core::option::Option<CustomFormatter>,
/// Client-side display mask metadata. The server stores raw data without mask literals.
#[prost(message, optional, tag = "3")]
pub mask: ::core::option::Option<DisplayMask>,
@@ -126,28 +123,6 @@ pub struct PatternRule {
#[prost(message, optional, tag = "2")]
pub constraint: ::core::option::Option<CharacterConstraint>,
}
/// Client-side formatter metadata.
/// The formatter "type" is intended to be resolved by a client-side formatter registry.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomFormatter {
/// Formatter type identifier; handled clientside.
/// Examples: "PSCFormatter", "PhoneFormatter", "CreditCardFormatter", "DateFormatter"
#[prost(string, tag = "1")]
pub r#type: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub options: ::prost::alloc::vec::Vec<FormatterOption>,
#[prost(string, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FormatterOption {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
/// Exact-value whitelist configuration.
/// This maps to canvas AllowedValues semantics.
#[derive(serde::Serialize, serde::Deserialize)]