Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [v3.0.1] - 2026-04-16
### Fixes
- Fixes some bugs in the `Number` component validations. Thank you [77media-creations](https://github.com/77media-creations)!
- The component incorrectly used the label as the validator key.
- A nullable rule was not applied to optional components, which could cause problems with other validation rules in the chain.

## [v3.0.0] - 2026-04-06
### Changed
- Requires `northwestern-sysdev/lodash-php` ^4.0.0, which removes the global `__()` function that conflicted with Laravel's `__()` (trans) helper.
Expand Down
2 changes: 1 addition & 1 deletion tests/Components/Inputs/NumberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static function validationsProvider(): array
// Regression: optional number field should accept null without error
'optional empty passes' => [[], null, true],
'optional empty string passes' => [[], '', true],
];
];
}

public static function submissionValueProvider(): array
Expand Down
3 changes: 2 additions & 1 deletion tests/Forms/ValidatedFormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public function testValidation(array $flatComponents, array $submission, bool $p
{
$validatedForm = new ValidatedForm($flatComponents, $submission);

dump($validatedForm->messages()->toArray(), $validatedForm->values());
$this->assertEquals($passes, $validatedForm->isValid());

// Values will be a Carbon object, so turn that into a string that matches the JSON file.
Expand Down Expand Up @@ -161,7 +162,7 @@ public static function validationDataProvider(): array
'calculations that depend on correct datatypes' => [
$components('calculation_definition.json'),
['totalCost' => '', 'otherFunding' => 10, 'netAmount' => null],
false,
true,
['totalCost' => null, 'otherFunding' => 10, 'netAmount' => -10],
],
'validation-key-significant characters in the label do not break validation' => [
Expand Down