console icon indicating copy to clipboard operation
console copied to clipboard

🐛 Bug Report: Wrong Validation Message for API Key Field

Open ItzNotABug opened this issue 1 year ago • 3 comments

👟 Reproduction steps

The Messaging Provider API Key field in the Settings indeed has a password type but the field itself isn't for Password. The validation text says - Password should contain at least 8 characters.

See -

messaging-api-key-field-error

👍 Expected behavior

The validation should say - API Key should contain at least 8 characters.

👎 Actual Behavior

The validation says - Password should contain at least 8 characters.

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

ItzNotABug avatar Mar 16 '24 15:03 ItzNotABug

image

The API Key field has a type of 'password' which is why this validation is shown. Should there even be a validation for this except when empty, because the API key will be copied from the source?

naman1608 avatar Jun 09 '24 12:06 naman1608

@naman1608, The issue explains that the field is indeed a password type, but the input validation shows "Password" while the field is called "API Key".

ItzNotABug avatar Jun 09 '24 17:06 ItzNotABug

@naman1608, The issue explains that the field is indeed a password type, but the input validation shows "Password" while the field is called "API Key".

So we will have to change the type from 'password', but there is no other Input component right now for this use case ie: in which we can customize the validation messages. Maybe we can make a more generic Input component for such cases?

naman1608 avatar Jun 10 '24 03:06 naman1608