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

Add validation to limit discussion title length #53

Closed
tobyzerner opened this issue Mar 27, 2015 · 14 comments
Closed

Add validation to limit discussion title length #53

tobyzerner opened this issue Mar 27, 2015 · 14 comments

Comments

@tobyzerner
Copy link
Contributor

There should be a smaller limit on the length of a discussion title (60 characters?)

@franzliedke
Copy link
Contributor

80?

@tobyzerner
Copy link
Contributor Author

Yeah 80 sounds good.

@Chigusa0w0
Copy link

Why not let site admins modify the max title length instead of write it into the source code? (but 80 is still a good length for title)
please forgive my poor english

@franzliedke
Copy link
Contributor

One reason that comes to my mind: the limit is probably enforced by database constraints (i.e. the title field in the discussions table).

@qrokodial
Copy link

Why not let site admins modify the max title length instead of write it into the source code?

what would be the use-case for modifying the title length? adding customization for the sake of having customization adds unnecessary complexity when there is no realistic reasons for modifying it.

@jgknight
Copy link

what would be the use-case for modifying the title length?

The use case would be a forum admin wanting to increase or decrease the allowed length of forum titles.. While I agree with not adding complexity, searching around on Google provides a lot of results for people looking to customize the title length of different software (vBulletin, phpBB, etc.) Perhaps it's not a priority for initial release, but it certainly is not in the realm of 'unrealistic' to provide some method to change it.

@solhuebner
Copy link

I think this is where the plugin concept can catch up on the end. Like I would like to see it as a bbPress replacement but I think this will not work out of the box. Although it would be awesome ;-)

@tobyzerner tobyzerner added this to the Beta milestone May 13, 2015
@franzliedke franzliedke self-assigned this Jun 30, 2015
@tobyzerner tobyzerner modified the milestone: 1.0 Beta 1 Jul 30, 2015
@tobyzerner
Copy link
Contributor Author

Also we should truncate the slug at 40 characters or so.

@tobyzerner tobyzerner changed the title No limit on title length Add validation to limit discussion title length Aug 27, 2015
@tobyzerner
Copy link
Contributor Author

What needs to be done:

  • Add a validation rule to the Discussion model to limit the discussion title to 80 characters.

@franzliedke
Copy link
Contributor

Fixed in #338, thanks @lbausch.

@ghost
Copy link

ghost commented Nov 7, 2016

One reason that comes to my mind: the limit is probably enforced by database constraints (i.e. the title field in the discussions table).

The field title isn't used in foreign keys and therefore has no such restrictions.

80 characters for the title - it's VERY, very little to complete the work: - /

@franzliedke
Copy link
Contributor

@balancer I was referring to the size of the database column, but that is currently set to 200.

@tobyzerner
Copy link
Contributor Author

It may as well be set to 255, 200 is kind of arbitrary.

The max title length should be configurable (not necessarily via default UI, but definitely via db settings). Do we have an issue for that elsewhere or should we reopen this one?

@franzliedke
Copy link
Contributor

I created an issue, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants