<?php
/**
 * If accept-weak-password-checkbox is not checked, the submit button is disabled, but no
 * error message is displayed. This is confusing for the user.
 * This file adds required to the checkbox whenever it applies, so an error message
 * is shown on submit.
 *
 * @package Nisje
 */

add_action( 'wp_enqueue_scripts', function () {
	wp_enqueue_script( 'weak-password-error-message', plugins_url( '/js/weak-password-error-message.js', __FILE__ ), [ 'jquery' ], 1, true );
} );
