https://github.com/wearerequired/js-comment-form-validation
Simple comment form validation based on the jQuery Validation plugin
https://github.com/wearerequired/js-comment-form-validation
comments jquery jquery-validation wordpress-plugin
Last synced: about 2 months ago
JSON representation
Simple comment form validation based on the jQuery Validation plugin
- Host: GitHub
- URL: https://github.com/wearerequired/js-comment-form-validation
- Owner: wearerequired
- License: gpl-2.0
- Created: 2017-04-28T07:25:09.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T16:14:01.000Z (over 2 years ago)
- Last Synced: 2025-01-13T09:26:13.860Z (3 months ago)
- Topics: comments, jquery, jquery-validation, wordpress-plugin
- Language: PHP
- Size: 354 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# JS Comment Form Validation
Easy to use client-side form validation for WordPress comments.
Inspired by [Instant Comment Validation](https://wordpress.org/plugins/instant-comment-validation/). Powered by the [jQuery Validation](https://github.com/jquery-validation/jquery-validation) plugin.
## Hooks & Filters
The plugin provides a filter to change the settings passed to the JavaScript.
### `js_comment_form_validation_settings` Filter
Allows you to filter the data that is sent to the JavaScript, like error messages and minimum required comment length.
```php
add_filter( 'js_comment_form_validation_settings', function( $script_data ) {
$script_data['rules']['url']['required'] = true;return $script_data;
} );
```