# contact-forms/1.3.3/PFBC/Validation/Required.php

Contact Forms by Cimatti, version 1.3.3. 12 lines.

- Page: https://pluginprobe.com/plugins/contact-forms/1.3.3/code/PFBC/Validation/Required.php
- Raw: https://pluginprobe.com/plugins/contact-forms/1.3.3/raw/PFBC/Validation/Required.php
- Modified: 2013-07-25T16:57:42+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/1.3.3/code/PFBC/Validation/Required.php#L10-L20`.

```php
<?php
class Validation_Required extends Validation {
	protected $message = "Error: %element% is a required field.";

	public function isValid($value) {
		$valid = false;
		if(!is_null($value) && ((!is_array($value) && $value !== "") || (is_array($value) && !empty($value))))
			$valid = true;
		return $valid;	
	}
}

```
