Skip to content

Commit 28504b0

Browse files
authored
v3.0.1 change notes (#496)
1 parent 45e3a8a commit 28504b0

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55

66
## [Unreleased]
77

8+
## [v3.0.1] - 2026-04-16
9+
### Fixes
10+
- Fixes some bugs in the `Number` component validations. Thank you [77media-creations](https://github.com/77media-creations)!
11+
- The component incorrectly used the label as the validator key.
12+
- A nullable rule was not applied to optional components, which could cause problems with other validation rules in the chain.
13+
814
## [v3.0.0] - 2026-04-06
915
### Changed
1016
- Requires `northwestern-sysdev/lodash-php` ^4.0.0, which removes the global `__()` function that conflicted with Laravel's `__()` (trans) helper.

tests/Components/Inputs/NumberTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static function validationsProvider(): array
2323
// Regression: optional number field should accept null without error
2424
'optional empty passes' => [[], null, true],
2525
'optional empty string passes' => [[], '', true],
26-
];
26+
];
2727
}
2828

2929
public static function submissionValueProvider(): array

tests/Forms/ValidatedFormTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public function testValidation(array $flatComponents, array $submission, bool $p
7777
{
7878
$validatedForm = new ValidatedForm($flatComponents, $submission);
7979

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

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

0 commit comments

Comments
 (0)