=== AddonLogic Comment Length Limit ===
Contributors: snehalpancholi
Tags: comments, moderation, validation, length, spam
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Enforce configurable minimum and maximum character lengths on WordPress comment submissions with a real-time counter and friendly error messages.

== Description ==

AddonLogic Comment Length Limit validates comments both client-side (live counter, form submit guard) and server-side (preprocess_comment filter) to ensure every submitted comment falls within the configured character range.

**Features:**
* Configurable minimum and maximum character limits (set to 0 to disable either)
* Real-time character counter below the comment textarea with colour-coded state
* Client-side form submission guard prevents out-of-range comments from even being sent
* Server-side validation as a safety net
* Customisable error messages with `{min}`, `{max}`, and `{count}` template tags
* Optional bypass for users with the `moderate_comments` capability
* Settings page under Settings → Comment Length

== Installation ==

1. Upload the `comment-length-limit` folder to `/wp-content/plugins/`.
2. Activate through the **Plugins** screen.
3. Go to **Settings → Comment Length** to set your limits and error messages.

== Frequently Asked Questions ==

= Can I disable one of the limits? =
Yes. Set the minimum or maximum to `0` to disable that limit entirely.

= Are admins always exempt? =
By default, users with `moderate_comments` capability skip validation. You can disable this in settings.

== Changelog ==

= 1.0.0 =
* Initial release.
