type textI18n = (string * string) list (** A label is just an association list*) type validation = { rule : string list Dsl.t; message : textI18n } type 't field_ex = T : ('db, 'ocaml, 't) Types.t -> 't field_ex type 'ref t (** Description of a field *) val named_of : 'ref t -> ('db, 'ocaml, 'ref) Types.t -> ('db, 'ocaml, 'ref) Types.t Types.named option (** [named_of field typ] is [Some named] — the field's {!Types.named} type, stamped with ['db] and ['ocaml] — when [typ] matches the declared type of [field] (checked with {!Types.eq} and {!Types.eq_ocaml}); [None] on type mismatch *) val create : 'ref field_ex -> textI18n -> ?placeholder:textI18n -> ?icon:unit -> ?required:bool -> ?validation:validation list -> ?criteria:string list Dsl.t -> Identifier.t -> 'ref t val name : _ t -> Identifier.t (** Name (identifier) for the field *) val label : _ t -> textI18n val placeholder : _ t -> textI18n option val icon : _ t -> unit option val type_ : 'ref t -> 'ref field_ex val required : _ t -> bool val validation : _ t -> validation list val criteria : _ t -> string list Dsl.t option