diff options
| author | Sébastien Dailly <sebastien@dailly.me> | 2026-11-18 20:24:52 +0100 |
|---|---|---|
| committer | Sébastien Dailly <sebastien@dailly.me> | 2026-11-18 21:57:48 +0100 |
| commit | 62123e577ee5d4066d53f8ad7e5ac3d2eb190430 (patch) | |
| tree | f569686630681a9eceb2685f69b55fe5a2bac17c /lib/model/field.ml | |
| parent | 7087a0c2c84e796e474784cbd28d4a4e574cf2c0 (diff) | |
Securized the queries in the database with a dedicated type for the Identifiers
Diffstat (limited to 'lib/model/field.ml')
| -rw-r--r-- | lib/model/field.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/model/field.ml b/lib/model/field.ml index 8ea38fd..c7e4667 100644 --- a/lib/model/field.ml +++ b/lib/model/field.ml @@ -5,7 +5,7 @@ type validation = { rule : string list Dsl.t; message : textI18n } type 't field_ex = T : ('a, 't) Typ.t -> 't field_ex type 't t = { - name : string; (** The internal name *) + name : Identifier.t; (** The internal name *) label : textI18n; placeholder : textI18n option; icon : unit option; @@ -16,7 +16,7 @@ type 't t = { (** Display the field when the criteria is valid *) } -let name : 'ref t -> string = fun t -> t.name +let name : 'ref t -> Identifier.t = fun t -> t.name let label : 'ref t -> textI18n = fun t -> t.label let placeholder : 'ref t -> textI18n option = fun t -> t.placeholder let icon : 'ref t -> unit option = fun t -> t.icon @@ -33,7 +33,7 @@ let create : ?required:bool -> ?validation:validation list -> ?criteria:string list Dsl.t -> - string -> + Identifier.t -> 't t = fun type_ label ?placeholder ?icon ?(required = false) ?(validation = []) ?criteria name -> |
