validation2 I dont know if its correct???
This commit is contained in:
Binary file not shown.
@@ -23,14 +23,16 @@ pub struct FieldValidation {
|
||||
#[prost(string, tag = "1")]
|
||||
pub data_key: ::prost::alloc::string::String,
|
||||
/// Current: only CharacterLimits. More rules can be added later.
|
||||
///
|
||||
/// Future expansion:
|
||||
/// PatternRules pattern = 11;
|
||||
/// DisplayMask mask = 12;
|
||||
/// ExternalValidation external = 13;
|
||||
/// CustomFormatter formatter = 14;
|
||||
#[prost(message, optional, tag = "10")]
|
||||
pub limits: ::core::option::Option<CharacterLimits>,
|
||||
/// Future expansion:
|
||||
/// PatternRules pattern = 11;
|
||||
#[prost(message, optional, tag = "3")]
|
||||
pub mask: ::core::option::Option<DisplayMask>,
|
||||
/// ExternalValidation external = 13;
|
||||
/// CustomFormatter formatter = 14;
|
||||
#[prost(bool, tag = "4")]
|
||||
pub required: bool,
|
||||
}
|
||||
/// Character limit validation (Validation 1)
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
@@ -49,6 +51,20 @@ pub struct CharacterLimits {
|
||||
#[prost(enumeration = "CountMode", tag = "4")]
|
||||
pub count_mode: i32,
|
||||
}
|
||||
/// Mask for pretty display
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct DisplayMask {
|
||||
/// e.g., "(###) ###-####" or "####-##-##"
|
||||
#[prost(string, tag = "1")]
|
||||
pub pattern: ::prost::alloc::string::String,
|
||||
/// e.g., "#"
|
||||
#[prost(string, tag = "2")]
|
||||
pub input_char: ::prost::alloc::string::String,
|
||||
/// e.g., "_"
|
||||
#[prost(string, optional, tag = "3")]
|
||||
pub template_char: ::core::option::Option<::prost::alloc::string::String>,
|
||||
}
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct UpdateFieldValidationRequest {
|
||||
|
||||
Reference in New Issue
Block a user