classes/hypeJunction/Prototyper/Elements/AttributeField.php
public function validate(\ElggEntity $entity) {

		$validation = new ValidationStatus();

		$value = get_input($this->getShortname());
		if (is_string($value)) {
			$value = strip_tags($value);
		}
		if (is_null($value) || $value == '') {
			if ($this->isRequired()) {
				$validation->setFail(elgg_echo('prototyper:validate:error:required', array($this->getLabel())));
			}
		} else {
			$validation = $this->applyValidationRules($value, $validation, $entity);
		}

		return $validation;
	}
public function validate(\ElggEntity $entity) {

		$validation = new ValidationStatus();

		$value = get_input($this->getShortname());
		if (is_string($value)) {
			$value = strip_tags($value);
		}
		if (is_null($value) || $value == '') {
			if ($this->isRequired()) {
				$validation->setFail(elgg_echo('prototyper:validate:error:required', array($this->getLabel())));
			}
		} else {
			$validation = $this->applyValidationRules($value, $validation, $entity);
		}

		return $validation;
	}
{@inheritdoc}