aws-amplify / aws-amplify/amplify-ui

Submitting single characters in ChangePassword component fields shows unfriendly validation errors

Open
#5,963 1 comment 0 reactions 0 assignees View on GitHub
AccountSettings feature-request React
Dominant language
TypeScript
Stars
1.1k
Forks
347
Avg merge
18h 29m
Merged PRs (30d)
9

Description

### Before creating a new issue, please confirm:

- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-ui/issues?q=is%3Aissue+) and [discussions](https://github.com/aws-amplify/amplify-ui/discussions).
- [X] I have tried disabling all browser extensions or using a different browser
- [X] I have tried deleting the node_modules folder and reinstalling my dependencies
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-ui/blob/main/CONTRIBUTING.md#bug-reports).

### On which framework/platform are you having an issue?

React

### Which UI component?

Account Settings

### How is your app built?

Vite

### What browsers are you seeing the problem on?

Chrome, Firefox

### Which region are you seeing the problem in?

eu-west-2

### Please describe your bug.

Using an unmodified `` component, type the letter 'a' into each field and submit the form. Unfriendly validation errors are shown.

### What's the expected behaviour?

User-friendly validation errors, e.g. "Incorrect username or password." or "Password did not conform with policy: Password not long enough".

### Help us reproduce the bug!

Using an unmodified `` component, type the letter 'a' into each field and submit the form.

![image](https://github.com/user-attachments/assets/b723a160-7d3d-42e7-8c7a-56990ea56ac0)

### Code Snippet

```typescript
// Put your code below this line.

```

### Console log output

_No response_

### Additional information and screenshots

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in the React AccountSettings.ChangePassword component with the letter “a” in each field and submitting the form. Trace how the component maps validation failures to displayed messages; done means single-character input produces user-friendly errors such as the examples in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript, vite
Domain
authentication, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.