Revision history for Perl module Validator::LIVR
0.01 2013-02-02
- First version, released on an unsuspecting world.
0.02 2013-08-12
- LIVR v0.2 support (not_empty_list)
0.03 Not Released
- Fixed pipelining (now validator passes the modified
result to each next rule).
0.04 2013-08-15
- LIVR v0.3 support (trim, to_lc, to_uc)
0.05
- Fix bug with applying validation rule after filter
0.06
- LIVR v0.4 support (remove, leave_only, url, iso_date, like with flags, rules aliasing)
0.07
- Add version to every pm file
0.08
- More detailed debug in tests
0.09
- Fix typo in MANIFEST paths
v2.0
- Switched to semver. New release version is 2.0
- Unified approach to types handling
- "Base rules" renamed to "Common rules".
- "Filter rules" renamed to "Modifiers". They do not validate anything, just modify data.
- "Helper rules" renamed to "Metarules" as this rules are for describing other rules
- Added common rule "any_object"
- Added string rule "string"
- Added string rule "eq"
- Added metarule "variable_object"
- Added metarule "or"
- Added modifier "default"
- Add more edge cases to test suite
- Add experimental status to the "like" rule
v2.1 2026-10-19
- Updated the test suite to the current LIVR test suite
- A rule with several names, such as { like => '^\w+$', max_length => 20 }, dies.
Only one of the rules was used, a random one (GitHub issue #11).
- A validator that died on a wrong rule dies again on the next validate(). Before,
the next validate() checked no fields and passed any data.
- "or" passes empty values to its rule sets too, so "required" and "not_empty" in them work
- No dependencies: "email" and "url" are checked as in the other LIVR implementations,
without Email::Valid and Regexp::Common. The module loads in 9 ms instead of 21.
- "email" rejects names and comments, such as "John <john@example.com>", spaces around
the address, line breaks, and TLDs that start with a digit, as in an IP address without
brackets. It accepts letters of other languages in the local part.
- "url" accepts a user and password, a query without a path, any characters in the path
and domain names in other languages. It rejects IP addresses with numbers over 255 and
a trailing newline.
- "url" checks a long wrong URL fast. A path of 100 KB took more than 20 seconds.
- "iso_date" rejects a trailing newline
- "iso_date" checks dates without Time::Piece, which printed "Garbage at end of string" warnings
- "equal_to_field" does not warn when the other field is missing
- "length_between" does not print debug output anymore
- Faster: validation of a form is 3.5 times faster, "email" 14 times, "url" 5.7 times,
building a validator and validating 2.6 times
- The license in META is Artistic 2.0, it was "unknown"
- Tests run on GitHub Actions with Perl from 5.10 to the newest one
- README.pod is not installed anymore. MakeMaker before 7.32 installed it as Validator/README.pod
- New documentation: a quick tour, all rules with their error codes, "prepare" and
how to write rules in Perl
- Bugs are reported in GitHub Issues, and META links to them
v2.2 2026-11-07
- The rules of the LIVR 2.5 draft (https://github.com/koorchik/LIVR/blob/master/drafts/v2.5.md):
boolean, not_one_of, max_decimals, digits, starts_with, ends_with, contains, iso_datetime,
iso_time, required_if, when, values, keys, any, list_length, unique, split, uuid, ip, cidr,
hostname, base64, hex, digest, mongo_id, hex_color, mac, e164, semver, jwt, luhn,
credit_card and iban. They are loaded on first use, so "use Validator::LIVR" is not slower.
They check their arguments in prepare(): a wrong argument dies, also undef
({ boolean => undef }) and undef or an empty list in place of rules
- "iso_date" takes { min => ..., max => ... } with dates, "today", "yesterday" and "tomorrow"
in UTC. Any other argument dies: before, it was ignored. { iso_date => undef } stays
"iso_date". A boolean gives WRONG_DATE, not FORMAT_ERROR
- "like": "$" matches only at the end of the value, as the LIVR specification
requires. "^[0-9]{5}$" accepted "12345\n" with a trailing newline.
- The rules of "or" and of aliases see the fields next to the field, so "equal_to_field"
works in them. In "list_of", "equal_to_field" sees no other fields: before, it saw the
item itself as the field "field"
- "eq" and "one_of" compare booleans as strings: { eq => JSON::PP::true } accepts true and
"true", so ["boolean", { eq => JSON::PP::true }] works. What they accepted before still
passes: "1" for true and "0" for false, and in "one_of" a boolean for 1 or 0
- "eq" outputs the value of the rule, as the specification and "one_of" do: { eq => 2 }
outputs the number 2 for "2"
- nested_object, list_of, list_of_objects, variable_object and list_of_different_objects with
an extra argument lost the custom rules, "like" with an extra argument lost its flags
- Updated the test suite to the current LIVR test suite, and added the LIVR 2.5 draft test
suite in t/test_suite_2.5. Tests need Test::MockTime
- Faster: building a validator does not copy the table of rules, "list_of", "or" and aliases
validate values without a validator call
v2.21 2026-11-07
- Docs: LIVR 2.5 is released, not a draft. Validator::LIVR implements LIVR 2.0 and
LIVR 2.5, the documentation links the LIVR 2.5 specification and the rules on the site
v2.22 2026-11-08
- Security fix in "url"
- "url" checks the host and the port as LIVR 2.5 specifies now: it rejects a dot after the
host, such as "https://www.google." or "http://example.com./path", host labels longer
than 63 characters, ports above 65535 and a ":" without a port. Hosts without a dot,
such as "intranet", any IPv4 address and a user with a password pass as before
- Updated the LIVR 2.5 test suite to the current one, with the new "url" cases
Keyboard Shortcuts
Global
s
Focus search bar
?
Bring up this help dialog
GitHub
gp
Go to pull requests
gi
Go to GitHub issues (only if GitHub is preferred repository)