message = __("Attention: Your passwords do not match.", 'contact-forms'); } else { $this->message = $message; } } public function isValid($value) { $valid = false; if ($this->otherPasswordFieldName !== '') { if (isset($_POST[$this->otherPasswordFieldName])) { $otherValue = stripslashes((string) $_POST[$this->otherPasswordFieldName]); $valid = $value === $otherValue; } } return $valid; } }