bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 59 forks source link

SBC Common Comp: BaseAddress field(s) should not validate while typing #11320

Open severinbeauvais opened 2 years ago

severinbeauvais commented 2 years ago

Currently, the deliveryInstructions text field in the BaseAddress component validates that the value doesn't have any leading, trailing, or consecutive space characters. (This was implemented to prevent issues in later processing.) This causes bad UX while a user types in something with spaces between words.

Proposed solution: Only perform validation after user leaves the subject input (ie, blur event).

@tlebedovich All address fields validate these "space rules". Should only the delivery address perform deferred validation, or all fields? Should this be a toggle that only some instances of the base address component use?

tlebedovich commented 2 years ago

@severinbeauvais - Can we just remove any leading, trailing or consecutive spaces for users (aka ignore them when they enter them, and remove them automatically?). I know this bugs @janisrogers when we serve errors for accidental spaces.

If not, then your proposed solution of deferred validation would improve the user experience.

Interesting, I've only noticed it on Delivery Instructions because when I type in the other address fields the error messages are always covered by my autofill and/or I tend to use the Canada Post look up. Just realized that issues is in those fields as well.

Screen Shot 2022-02-24 at 5 41 14 PM

severinbeauvais commented 2 years ago

@jdyck-fw @lmcclung For grooming/planning.

jdyck-fw commented 2 years ago

This should be merged with #11547