pub struct TextAreaField {
pub id: Option<String>,
pub label: String,
pub placeholder: Option<String>,
pub default_value: Option<String>,
pub required: bool,
pub readonly: bool,
pub rows: Option<u32>,
pub max_length: Option<usize>,
pub validation: Option<FormValidation>,
pub conditional_validation: Option<ConditionalValidation>,
}Expand description
Multi-line text area field.
Fields§
§id: Option<String>Optional unique identifier.
label: StringField label displayed to the user.
placeholder: Option<String>Placeholder text when empty.
default_value: Option<String>Default value.
required: boolWhether the field is required.
readonly: boolWhether the field is read-only.
rows: Option<u32>Number of visible rows.
max_length: Option<usize>Maximum character length.
validation: Option<FormValidation>Validation rules.
conditional_validation: Option<ConditionalValidation>Conditional validation based on another field’s value.
Implementations§
Source§impl TextAreaField
impl TextAreaField
Sourcepub const fn with_max_length(self, max_length: usize) -> Self
pub const fn with_max_length(self, max_length: usize) -> Self
Set the maximum length.
Sourcepub fn with_conditional_validation(self, cv: ConditionalValidation) -> Self
pub fn with_conditional_validation(self, cv: ConditionalValidation) -> Self
Set conditional validation.
Trait Implementations§
Source§impl Clone for TextAreaField
impl Clone for TextAreaField
Source§fn clone(&self) -> TextAreaField
fn clone(&self) -> TextAreaField
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextAreaField
impl Debug for TextAreaField
Source§impl<'de> Deserialize<'de> for TextAreaField
impl<'de> Deserialize<'de> for TextAreaField
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TextAreaField
impl PartialEq for TextAreaField
Source§impl Serialize for TextAreaField
impl Serialize for TextAreaField
impl Eq for TextAreaField
impl StructuralPartialEq for TextAreaField
Auto Trait Implementations§
impl Freeze for TextAreaField
impl RefUnwindSafe for TextAreaField
impl Send for TextAreaField
impl Sync for TextAreaField
impl Unpin for TextAreaField
impl UnsafeUnpin for TextAreaField
impl UnwindSafe for TextAreaField
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.