public function validate(\ElggEntity $entity) {

		$validation = new ValidationStatus();

		$value = array_filter((array) get_input($this->getShortname(), array()));

		if ($this->isRequired() && (!$value || !count($value))) {
			$validation->setFail(elgg_echo('prototyper:validate:error:required', array($this->getLabel())));
		}

		if (is_array($value)) {
			foreach ($value as $val) {
				$validation = $this->applyValidationRules($val, $validation, $entity);
			}
		}

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

		$validation = new ValidationStatus();

		$value = array_filter((array) get_input($this->getShortname(), array()));

		if ($this->isRequired() && (!$value || !count($value))) {
			$validation->setFail(elgg_echo('prototyper:validate:error:required', array($this->getLabel())));
		}

		if (is_array($value)) {
			foreach ($value as $val) {
				$validation = $this->applyValidationRules($val, $validation, $entity);
			}
		}

		return $validation;
	}
{@inheritdoc}