wearerequired/js-comment-form-validation

WordPress plugin to add simple comment form validation based on the jQuery Validation plugin.

Installs: 6 708

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 4

Type:wordpress-plugin

pkg:composer/wearerequired/js-comment-form-validation

1.2.0 2019-05-03 13:53 UTC

README

Easy to use client-side form validation for WordPress comments.

Inspired by Instant Comment Validation. Powered by the 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.

add_filter( 'js_comment_form_validation_settings', function( $script_data ) {
	$script_data['rules']['url']['required'] = true;

 	return $script_data;
} );