@@ -529,6 +529,88 @@ module Validation : sig
529529 -> string validated_value
530530 (* * [where ?message predicate actual] ensures that [actual] satisfies
531531 [predicate]. [message] is used for custom error messages. *)
532+
533+ (* * Useful function to be used with regular string validators. *)
534+
535+ val lowercase_ascii : string -> string
536+ val trim : string -> string
537+ end
538+
539+ (* * {2 Int validators}
540+
541+ Validators specifically for int values. *)
542+
543+ module Int : sig
544+ val positive : int -> int validated_value
545+ (* * Integer version of {!val:Data.Validation.positive} *)
546+
547+ val bounded : min :int -> max :int -> int -> int validated_value
548+ (* * Integer version of {!val:Data.Validation.bounded} *)
549+
550+ val equal : int -> int -> int validated_value
551+ (* * Integer version of {!val:Data.Validation.equal} *)
552+
553+ val not_equal : int -> int -> int validated_value
554+ (* * Integer version of {!val:Data.Validation.not_equal} *)
555+
556+ val gt : int -> int -> int validated_value
557+ (* * Integer version of {!val:Data.Validation.gt} *)
558+
559+ val ge : int -> int -> int validated_value
560+ (* * Integer version of {!val:Data.Validation.ge} *)
561+
562+ val lt : int -> int -> int validated_value
563+ (* * Integer version of {!val:Data.Validation.lt} *)
564+
565+ val le : int -> int -> int validated_value
566+ (* * Integer version of {!val:Data.Validation.le} *)
567+
568+ val one_of : int list -> int -> int validated_value
569+ (* * Integer version of {!val:Data.Validation.one_of} *)
570+
571+ val where :
572+ ?message : (int -> string ) -> (int -> bool ) -> int -> int validated_value
573+ (* * Integer version of {!val:Data.Validation.where} *)
574+ end
575+
576+ (* * {2 Float validators}
577+
578+ Validators specifically for float values. *)
579+
580+ module Float : sig
581+ val positive : float -> float validated_value
582+ (* * Float version of {!val:Data.Validation.positive} *)
583+
584+ val bounded : min :float -> max :float -> float -> float validated_value
585+ (* * Float version of {!val:Data.Validation.bounded} *)
586+
587+ val equal : float -> float -> float validated_value
588+ (* * Float version of {!val:Data.Validation.equal} *)
589+
590+ val not_equal : float -> float -> float validated_value
591+ (* * Float version of {!val:Data.Validation.not_equal} *)
592+
593+ val gt : float -> float -> float validated_value
594+ (* * Float version of {!val:Data.Validation.gt} *)
595+
596+ val ge : float -> float -> float validated_value
597+ (* * Float version of {!val:Data.Validation.ge} *)
598+
599+ val lt : float -> float -> float validated_value
600+ (* * Float version of {!val:Data.Validation.lt} *)
601+
602+ val le : float -> float -> float validated_value
603+ (* * Float version of {!val:Data.Validation.le} *)
604+
605+ val one_of : float list -> float -> float validated_value
606+ (* * Float version of {!val:Data.Validation.one_of} *)
607+
608+ val where :
609+ ?message : (float -> string )
610+ -> (float -> bool )
611+ -> float
612+ -> float validated_value
613+ (* * Float version of {!val:Data.Validation.where} *)
532614 end
533615
534616 (* * {2 Validator combinators} *)
0 commit comments