Skip to content

πŸ› BUG: max character count on shared post not shown or validatedΒ #2021

@GrahamTheDevRel

Description

@GrahamTheDevRel

What went wrong? πŸ€”

If you click on "share a link" there is a box to enter extra info.

share a link screen

This box does not stop you writing more than 250 characters, which appears to be the limit according to the graphQL error I saw in the network tab.

The error shown is just "validation failed" in the user interface.

This needs the same character count info and front end validation as the "write a post" tab in the same screen to avoid confusion.

Steps to replicate

Insert a URL and then type 251 characters (or more) into the "share your thoughts" screen, you will get a validation error toast.

Network request response:

{
    "data": null,
    "errors": [
        {
            "message": "Validation error",
            "locations": [
                {
                    "line": 14,
                    "column": 5
                }
            ],
            "path": [
                "createPostInMultipleSources"
            ],
            "extensions": {
                "code": "ZOD_VALIDATION_ERROR",
                "issues": [
                    {
                        "origin": "string",
                        "code": "too_big",
                        "maximum": 250,
                        "inclusive": true,
                        "path": [
                            "commentary"
                        ],
                        "message": "Too big: expected string to have <=250 characters"
                    }
                ]
            }
        }
    ]
}

Expected Behavior

It stops you adding more than 250 characters in the first place and shows a character counter.

Steps to Reproduce Issue

Include in main description

Solution Proposed

See expected behaviour.

Screenshots

No response

Environment

No response

Browsers

Chrome

OS

Windows

Version of daily.dev

latest / web

Additional Context

Code of Conduct

  • I follow the conditions of this project.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions