Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): enhance user input validation and error handling #4412

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

luannmoreira
Copy link
Member

@luannmoreira luannmoreira commented Dec 9, 2024

Description

This pull request improves input validation, error handling, and user feedback in the account setup and sign-up flows. The changes aim to enhance the user experience by providing clearer messages and ensuring stricter input validation.

Changes Made

Validation Enhancements:

    Updated username validation rules:
        Required field.
        Must be 3-32 characters.
        Can only contain lowercase letters, numbers, and specific symbols (-_.@).
        Added descriptive error messages for validation failures.
        
    Improved password validation:
        Required field.
        Must be 5-32 characters.
        Includes detailed error messages for length constraints.

Refactoring:

    Simplified computed property syntax in Setup.vue (e.g., hasSign).
    Adjusted hasErrors() in SignUp.vue to include the privacy policy acceptance check.

UI Updates:

    Updated button states in SignUp.vue:
        disabled state now depends on hasErrors() instead of acceptPrivacyPolicy alone.
        Changed button variant dynamically based on validation state.

Error Messaging:

    Improved setup error messages:
        User-friendly success and error notifications.
        Clearer guidance for troubleshooting issues during account setup.

Testing

Verified username and password validation for valid and invalid inputs.
Checked UI states (button enabled/disabled) based on form validation errors.
Ensured error messages display appropriately during account setup failures.

Fixes

fixes #4380

These changes ensure stricter validation and better user guidance, reducing potential input errors and enhancing overall user satisfaction.

- Improved username validation to enforce allowed characters, length, and
custom error messages in both Setup.vue and SignUp.vue.

- Enhanced password validation with detailed error messages for length
constraints.

- Refactored computed properties for cleaner syntax
(e.g., hasSign in Setup.vue).

- Updated error messages for setup process to provide clearer guidance during
failures.

- Adjusted button states and variants in SignUp.vue to depend on validation
errors.
@luannmoreira luannmoreira requested a review from a team as a code owner December 9, 2024 20:53
@luannmoreira luannmoreira self-assigned this Dec 9, 2024
@luannmoreira luannmoreira added kind/bug Something isn't working area/ui javascript Pull requests that update Javascript code status/good-to-merge labels Dec 9, 2024
@gustavosbarreto gustavosbarreto merged commit 44ec855 into master Dec 10, 2024
24 checks passed
@gustavosbarreto gustavosbarreto deleted the fix/register-validation branch December 10, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui javascript Pull requests that update Javascript code kind/bug Something isn't working status/good-to-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate Username Format and Disable Submit Button on Signup Page
2 participants