canceraiddev/elm-form-builder/12.0.0

NOTE: the latest version is 28.0.1

Form.Lib.RegexValidation

Helper functions for Regex Validation

Time

decoder : Decoder RegexValidation
type alias RegexValidation =
{ pattern : Regex
, message : String
}
forbidSuffixRegex : String -> Maybe Regex

Constructs a Regex that forbids a string from having the provided suffixes. Avoids lookarounds to ensure compatibility with WebKit-based browsers.

fromSuffixConstraints : List ( String, String ) -> List RegexValidation