# contact-forms/2.3.6/classes/Validation/Password.php

Contact Forms by Cimatti, version 2.3.6. 26 lines.

- Page: https://pluginprobe.com/plugins/contact-forms/2.3.6/code/classes/Validation/Password.php
- Raw: https://pluginprobe.com/plugins/contact-forms/2.3.6/raw/classes/Validation/Password.php
- Modified: 2026-04-08T09:49:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/contact-forms/2.3.6/code/classes/Validation/Password.php#L10-L20`.

```php
<?php
class AccuaForm_Validation_Password extends Validation {
  protected $otherPasswordFieldName = '';

	public function __construct($message = "") {
		if(empty($message)) {
			$this->message = __("Passwords do not match", 'contact-forms');
		} else {
			$this->message = $message;
		}
	}

	public function isValid($value) {
	  $valid = false;
	  if ($this->otherPasswordFieldName !== '') {
	    // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Form validation runs during form processing which handles nonces
	    if (isset($_POST[$this->otherPasswordFieldName])) {
	      // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Password comparison, value cast to string
	      $otherValue = stripslashes((string) $_POST[$this->otherPasswordFieldName]);
	      $valid = $value === $otherValue;
	    }
	  }
		return $valid;
	}
}

```
