You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Court Orders: initial commit
* Make MoJ library work
* Show 'Enter at least one court order' error
* First working version of array data binding with 'Add another' MoJ component
* Match as-is OCMC alignment
* Address case when model data is empty
* Remove submitted empty court orders
* Override CSS to not show Remove button in 'Add another' MoJ component instances in Citizen UI
* Format code
* Get enhancements to genericForm.ts from branch CIV-1478_expenses
* Manage validation errors for nested array of court orders
* Get enhancements to genericForm.ts from branch CIV-1478_expenses
* Make constant name more accurate
* Workaround for ministryofjustice/moj-frontend#343 and ignore js files copied to make MoJ frontend library work
* Remove duplicate code
* Extract macro into separate file
* Add client logic to stop showing "Add another court order" button once the maximum number of rows (10) has been reached
* Align input text area width while keeping it flexible
* Remove unused imports
* Remove duplicate constant
* Add test coverage and remove duplicate error message constant
* Improve logic to locate add-another buttons to add event listener
* Exclude client js code from sonar scan
* Exclude MoJ boilerplate code from linting
* Remove lint warnings
* Workaround 0 input being cleared upon form submission
* PR review feedback
* PR review feedback
* PR review feedback
* Attempt to fix pipeline issue
* PR review feedback
* PR review feedback
* PR review feedback
* Add guard against undefined object scenario
* Undefined amount should cause the "one pound or more" error message
Undefined instalment amount should cause the "higher than 0" error message
* Workaround so that 0 input doesn't get cleared upon validation (behaviour inherited from govukInput component)
Prerequisites
Description
The mechanism used by MoJ "add-another" component to copy items includes error messages in the copy.
Steps to Reproduce
Populate first "add-another" item and validate in a way that displays an error message:
Press the Add button, to add a new item
Expected behaviour:
The newly added item should not have any error messages
Actual behaviour: [What happens]
The error message from the first item is replicated in the newly added item:
Reproduces how often: [What percentage of the time does it reproduce?]
100%
Versions
@ministryofjustice/frontend: 1.3.0
OS: Ubuntu 20.04.4 LTS
Browser: Chrome 100.0.4896.60 (Official Build) (64-bit)
Additional Information
N/A
The text was updated successfully, but these errors were encountered: