Revision history for Params-Validate-Strict

0.31	Fri May  8 08:03:03 EDT 2026

  [Enhancements]
  - Use Readonly::Values::Boolean for the boolean type — boolean values are
    now drawn from that module's %booleans hash, giving a consistent and
    extensible set of recognised truthy/falsy strings across the codebase.
  - Allow 'minimum' as a synonym for 'min' in schema rules.
  - Allow 'regex' as a synonym for 'matches' in schema rules.

  [Bug Fixes]
  - Fixed: 'nullable' with a present value triggered "Unknown rule 'nullable'"
    because the rule-name was handled before the dispatch loop (to set
    $is_optional) but had no corresponding no-op elsif in the loop itself.
    The absent-value path was unaffected because the optional block exits
    with 'next' before the loop runs; only the present-value path was broken.
  - Fixed: nested hashref defaults were not applied when the input hashref
    was empty ({}).  The guard condition checked scalar keys of the original
    input value rather than of the post-defaults hashref, so an empty input
    caused the nested validate_strict call to be skipped entirely.
  - Fixed: when an optional parameter had both 'default' and 'schema' set and
    the parameter was absent, the 'default' value was overwritten by the
    result of nested schema processing because there was no 'next' after
    storing the default.  The default now wins: a 'next' is inserted
    immediately after $validated_args{$key} = $rules->{'default'}.
  - Fixed: arrayref fields with a field-schema hash (e.g. schema => { name =>
    { type => 'string' }, age => { type => 'integer' } }) caused "Unknown
    rule 'name'" because the inner validate_strict call wrapped the element
    and schema incorrectly, causing field names to be treated as rule names.
    The handler now distinguishes a field-schema hash (no top-level 'type'
    key) from a rule hash (has 'type') and calls validate_strict accordingly.
  - Fixed: the 'transform' coderef was invoked twice for every present field —
    once explicitly before the rule-dispatch loop, and again by the generic
    "coerce CODE rule-values by calling them" guard inside the loop.  The
    'optional' coderef had the same double-invocation bug.  Both are now
    added to the exclusion list alongside 'validate', 'callback', and
    'validator'.

0.30	Sun Feb 22 21:03:42 EST 2026
	Added carp_on_warn support
	In support of better OOP, a value can now be an object if it understands 'as_string()'
	If no schema is given, allow all arguments
	Better error message when a positional argument makes no sense
	Pass $args and $schema to a validation callback

0.29	Sat Jan 31 16:29:42 EST 2026
	Document "can" and "optional" as a code ref a bit more
	Added nullable as a synonym for optional
	Updated to the latest test dashboard
	Fix https://www.cpantesters.org/cpan/report/c1353bb2-fd80-11f0-a3bc-a055f9c4ba34

0.28	Tue Dec 23 20:28:19 EST 2025
	Added relationship validator
	Handle undefined value in 'isa' test
	Fixed handling of min or max set to 0
	Allow type to be 'Str' or 'Bool' to be compatible with other schema definitions
	Increased test coverage

0.27	Sat Dec 13 11:03:00 EST 2025
	Added enum as a synonym of memberof
	Support unix_timestamp semantic

0.26	Tue Dec  9 20:11:39 EST 2025
	Don't error if utf-8 doesn't decode
	Create helper routine _number_of_characters()

0.25	Thu Dec  4 08:05:49 EST 2025
	Now dies if the schema says that the minimum length of a string should be < 0
	String length comparisons are now character counts, not bytes

0.24	Mon Nov 17 08:19:19 EST 2025
	error_message renamed error_msg (now consistent with Data::Processor)
	added description field (inspired by Data::Processor)
	Call die after croak to be sure of death
	Fixed RT#171339

0.23	Thu Oct 30 13:37:31 EDT 2025
	Flag attempting to compare numbers as strings
	Added handling for positional arguments

0.22	Sat Oct 25 21:51:13 EDT 2025
	If a cross_validation fails, invalidate all arguments
	Args were being passed as valid with some settings of logger
	Improved handling of defaults within nested schemas

0.21	Thu Oct 23 20:12:51 EDT 2025
	Added cross_validation parameter for validating relationships between fields
	Added notmemberof to blacklist items
	Added case_sensitive flag (defaults to 1)

0.20	Thu Oct 23 08:22:29 EDT 2025
	Added conditional validation rules
	Added custom types
	Added transformation/sanitization rules

0.19	Tue Oct 21 15:34:58 EDT 2025
	Allow a parameter to have different allowable types

0.18	Mon Oct 20 11:56:19 EDT 2025
	Handle when an undefined object is passed in

0.17	Fri Oct 17 21:00:50 EDT 2025
	Allow regexes in a schema to be a simple string

0.16	Sat Oct 11 18:35:15 EDT 2025
	Added 'validate' to the schema language
	Allow yes/no for booleans
	Fix value => 0 for default

0.15	Thu Oct  9 16:48:57 EDT 2025
	Added float as a synomym of number
	Do string compares on bools for edge case testing

0.14	Mon Sep 29 15:17:39 EDT 2025
	Support optionals for memberof
	Min/max make no sense with memberof

0.13	Sat Sep 27 10:27:25 EDT 2025
	Say how long the text is, when complaining it's too long
	Say what the current value is when testing max
	Better assertion that the type of a value has not been given
	Give line number of the assertion failure
	Fix https://www.cpantesters.org/cpan/report/905b8bfc-9a5e-11f0-a3bc-a055f9c4ba34
	Support the boolean data type

0.12	Tue Sep 16 16:25:18 EDT 2025
	Support the logger argument
	Remove unneeded regex
	Allow 'can' to take a list of methods as arrayref
	Added the default and error_message and schema options
	Added array element validation for nested validation

0.11	Tue Aug 26 15:02:00 EDT 2025
	args can now also be input, to be used with Return::Set which takes output
	Matches and nomatch now works on arrayrefs, checking each member of the array

0.10	Wed Aug  6 20:40:12 EDT 2025
	Allow args to be not given, will allow if everything is optional
	Allow { arg => undef }

0.09	Wed Aug  6 15:29:55 EDT 2025
	Optimize conditional
	Added missing dependencies
	Safer numeric coercion
	Use Scalar::Util::looks_like_number for number verification
	Changed some of the messages
	Documented migration from legacy validators

0.08	Tue Aug  5 18:58:37 EDT 2025
	Validate objects

0.07	Tue Aug  5 10:43:55 EDT 2025
	Validate that max > min in the schema

0.06	Wed Jul 30 14:37:31 EDT 2025
	Added the 'nomatch' and 'memberof' rules

0.05	Tue Jul 29 08:24:59 EDT 2025
	Bump the minimum version of Params::Get
		https://www.cpantesters.org/cpan/report/9433e5e2-6c2f-11f0-8186-d3a6de164758
	Fix counting of keys in a hash

0.04	Mon Jul 28 12:09:13 EDT 2025
	Added arrayref, hashref and coderef as valid value types

0.03	Mon Apr  7 07:42:43 EDT 2025
	Use Params::Get

0.02	Wed Feb 26 16:24:49 EST 2025
	Added the "unknown_parameter_handler" argument
	Added CI tools
	Use named parameters rather than positional ones

0.01	Wed Feb 26 11:35:19 EST 2025
        First draft
