Patron Notice form Validation fires too often, causing unnecessary requests.

Description

In PatronNoticeAboutSection - the validation function validateName is re-intialized/remade every render causing its logic to be re-executed. The function likely needs to be wrapped in a render-stable hook (useRef, useCallback) rather than declared directly.

Opening the Network tab in Chrome devtools, the request to pull templates for validating names happens with every keystroke in the editor for the template’s message. The request logic lives in the validation function of the ‘name’ field.

We originally thought that stripes-template-editor was to blame, but this is resolvable at the form level. It should not validate the uniqueness of ‘name’ when the ‘name’ field itself did not change.

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

2

Checklist

hide

Activity

Show:

Oleksandr Hrusha March 19, 2025 at 9:35 AM

Oleksandr Hrusha March 18, 2025 at 12:17 PM

Dmitriy Litvinenko March 17, 2025 at 10:13 AM

Available for testing on

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Vega

Fix versions

Release

Sunflower (R1 2025)

RCA Group

Implementation coding issue

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created February 24, 2025 at 7:28 PM
Updated March 19, 2025 at 6:16 PM
Resolved March 19, 2025 at 6:16 PM
TestRail: Cases
TestRail: Runs