pub struct FormField {Show 14 fields
pub name: Option<String>,
pub id: Option<String>,
pub field_type: FieldType,
pub label: Option<String>,
pub placeholder: Option<String>,
pub value: Option<String>,
pub required: bool,
pub disabled: bool,
pub readonly: bool,
pub autocomplete: Option<String>,
pub pattern: Option<String>,
pub min_length: Option<usize>,
pub max_length: Option<usize>,
pub options: Vec<SelectOption>,
}Expand description
表单中的单个字段
Fields§
§name: Option<String>字段 name 属性
id: Option<String>字段 id 属性
field_type: FieldType字段类型
label: Option<String>关联的 label 文本
placeholder: Option<String>placeholder 属性
value: Option<String>默认值
required: bool是否必填
disabled: bool是否禁用
readonly: bool是否只读
autocomplete: Option<String>autocomplete 属性值
pattern: Option<String>输入模式校验正则
min_length: Option<usize>最小长度
max_length: Option<usize>最大长度
options: Vec<SelectOption>选择型字段的选项列表
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FormField
impl<'de> Deserialize<'de> for FormField
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
Auto Trait Implementations§
impl Freeze for FormField
impl RefUnwindSafe for FormField
impl Send for FormField
impl Sync for FormField
impl Unpin for FormField
impl UnsafeUnpin for FormField
impl UnwindSafe for FormField
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