leptos_controls_core/
meta.rs

1use std::borrow::Cow;
2
3pub trait FieldMeta {
4    ///
5    /// 字段类型
6    ///
7    type Type;
8
9    ///
10    /// 标签
11    ///
12    const LABEL: &'static str;
13
14    ///
15    /// 是否必须
16    ///
17    const REQUIRED: bool;
18
19    ///
20    /// 校验函数
21    ///
22    const VALIDATE: fn(&Self::Type) -> Option<Cow<'static, str>>;
23}