Provides dependency-free validators for common input values. Validation methods return a boolean and do not modify their arguments.
Availability: ZPE 1.14.11 is the first version to support the Validation module.
Module functions
The following is a list of all functions available in this module.
-
date
[1.14.11+]
Checks whether a date-time string can be parsed using the supplied Java date-time format.
-
decimal
[1.14.11+]
Checks for a signed decimal-number representation.
-
email
[1.14.11+]
Checks the basic structure of an email address. It does not verify that the address exists.
-
input_validate
[1.14.11+]
Reads input until the supplied function accepts it, optionally stopping after a maximum number of attempts.
This functionality was originally available as a predefined function from ZPE 1.7.3, before it became a function of the Validation module.
-
integer
[1.14.11+]
Checks for a signed whole-number representation.
-
ip
[1.14.11+]
Checks for either an IPv4 or IPv6 address.
-
ipv4
[1.14.11+]
Checks for an IPv4 address.
-
ipv6
[1.14.11+]
Checks for an IPv6 address.
-
json
[1.14.11+]
Checks whether a string contains valid JSON.
-
length
[1.14.11+]
Checks that a string length is within the supplied inclusive range.
-
matches
[1.14.11+]
Checks a Java regular-expression pattern. Invalid patterns return false.
-
one_of
[1.14.11+]
Checks whether a value matches one of the values in an allowed list.
-
password_strength
[1.14.11+]
Checks for at least eight characters containing uppercase, lowercase, numeric, and special characters.
-
phone
[1.14.11+]
Checks a phone number. Optional country rules are US, CA, and GB.
-
required
[1.14.11+]
Checks that a value is present and is not an empty or whitespace-only string.
-
url
[1.14.11+]
Checks for an absolute URL with a scheme and host.
-
uuid
[1.14.11+]
Checks for a UUID.

There are no comments on this page.
Comments are welcome and encouraged, including disagreement and critique. However, this is not a space for abuse. Disagreement is welcome; personal attacks, harassment, or hate will be removed instantly. This site reflects personal opinions, not universal truths. If you can’t distinguish between the two, this probably isn’t the place for you. The system temporarily stores IP addresses and browser user agents for the purposes of spam prevention, moderation, and safeguarding. This data is automatically removed after fourteen days. Your email address is stored so that replies can be sent to your email address.
Comments powered by BalfComment