Skip to content

"Edit Profile" bio must have a minimum of 30 characters. #1092

@ordnl

Description

@ordnl

From #945: when this is fixed, update these meta posts:
https://meta.codidact.com/posts/287128
https://meta.codidact.com/posts/287130

Describe the bug
Some markdown editors on the site have a 30 character minimum. This may not be desirable in some cases.

To Reproduce

  1. Go to: /users/edit/profile
  2. Edit "Profile" bio text to have < 30 characters.
  3. Save button is disabled.

Expected behavior
I was expecting either:

  • A helpful error message stating the 30 character minimum or
  • To be able to have a bio with < 30 characters.

Instead the "Save" button was disabled silently.

Environment

  • OS: macOS Monterey
    • Browser: Chromium
    • Version: 103.0.5060.53
  • OS: Slackware Linux 15
    • Browser: Firefox
    • Version: 102.12.0esr
  • OS: Windows 10
    • Browser: Chrome
    • Version: 114.0.5735.198

Additional context
While I have no experience with Ruby On Rails, it seems like this is caused by the following:

This means, changing data-min via Inspect Element will bypass this limit for "Edit Profile" since it is not enforced server side (however it seems like it is for posts?)

Changing data-min="30" in mdhint will affect:

Perhaps, body_field & mdhint could accept min & max with default values set at 30?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: backendChanges to server-side codecomplexity: unassessedNeeds further developer investigation before complexity/feasibility can be determined.priority: medium

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions