Zodish.Type.String (zodish v0.2.4)
View SourceThis module describes a Zodish string type.
Summary
Functions
Either enables or disables coercion for the given String type.
Either enables or disables downcasing for the given String type. If enabled, the string will be downcased before performing any other validations.
Creates a new String type.
Either enables or disables trimming for the given String type. If enabled, the string will be trimmed before performing any other validations.
Either enables or disables upcasing for the given String type. If enabled, the string will be upcased before performing any other validations.
Types
@type t() :: %Zodish.Type.String{ coerce: boolean(), downcase: boolean(), ends_with: Zodish.Option.t(String.t()) | nil, length: Zodish.Option.t(non_neg_integer()) | nil, max: Zodish.Option.t(non_neg_integer()) | nil, min: Zodish.Option.t(non_neg_integer()) | nil, regex: Zodish.Option.t(Regex.t()) | nil, starts_with: Zodish.Option.t(String.t()) | nil, trim: boolean(), upcase: boolean() }
Functions
Either enables or disables coercion for the given String type.
Either enables or disables downcasing for the given String type. If enabled, the string will be downcased before performing any other validations.
Creates a new String type.
Either enables or disables trimming for the given String type. If enabled, the string will be trimmed before performing any other validations.
Either enables or disables upcasing for the given String type. If enabled, the string will be upcased before performing any other validations.