Closed jwalgran closed 5 years ago
Thanks. I was focued on editing existing fields and overlooked the new field dialog.
I intentionally did not dig into validating existing fields that may have whitespace issues to keep the scope of the change small and because we are planning on cleaning up existing data via scripting.
I added a FIXUP commit to properly disable the button on the new choice field dialog when there is a client side validation error.
Thanks for the thorough review.
Overview
Leading or trailing whitespace cannot be easily seen, but causes problems matching values. This change follows the pattern of other client-side choice validations.
Connects https://github.com/OpenTreeMap/otm-clients/issues/442
Demo
Notes
Optional. Ancillary topics, caveats, alternative strategies that didn't work out, anything else.
Testing Instructions
trailing-choice
Edit
and verify that an error message is displayed and the save button is disabled if an existing choice or a new choice has leading or trailing whitespace