Validate all the properties in the model
return true if all passed

@return bool True if all properties are valid
505677
public function valid()
    {

        $allowedValues = $this->getEventResponseAllowableValues();
        if (!in_array($this->container['eventResponse'], $allowedValues)) {
            return false;
        }
        return true;
    }
396350
public function validate()
    {
        $result = true;
        $this->errors = [];
        $data = $this->get();

        foreach ($this->requiredFields as $requiredField) {
            if (!isset($data[$requiredField])) {
                $result = false;
                $this->errors[$requiredField] = 'cannot be empty';
            }
        }

        foreach ($data as $fieldName => $fieldValue) {
            if (!array_key_exists($fieldName, $this->errors) && $fieldValue !== null && !is_string($fieldValue)) {
                $this->errors[$fieldName] = 'should be a string';
            }
        }

        return $result;
    }
749884
public function valid()
	{
		// Check the current position.
		if (!is_scalar($this->current) || !isset($this->objects[$this->current]))
		{
			return false;
		}

		return true;
	}
1246312
protected function validate()
    {
        foreach ($this->_requiredAttr as $attr) {
            if (is_array($attr)) {
                $valid = false;
                foreach ($attr as $sub) {
                    if (!is_null($this->$sub)) {
                        $valid = true;
                        break;
                    }
                }
                if (!$valid) {
                    return false;
                }
            } elseif (is_null($this->$attr)) {
                return false;
            }
        }
        return true;
    }
820070
public function valid()
    {

        $allowedValues = $this->getStateAllowableValues();
        if (!in_array($this->container['state'], $allowedValues)) {
            return false;
        }
        return true;
    }
1192655
public function valid()
    {
        if (isset($this->objects[$this->position])) {
            return true;
        }

        if ($this->currentData == null) {
            return false;
        }

        return $this->generator->valid();
    }
394040
public function valid()
	{
		if( $this->next() )
			return TRUE;
		if( is_resource( $this->filePointer ) )
			fclose( $this->filePointer );
		return FALSE;
	}
382921
public function valid()
    {

        $allowedValues = $this->getLocationTypeAllowableValues();
        if (!in_array($this->container['locationType'], $allowedValues)) {
            return false;
        }
        return true;
    }
319937
public function valid()
    {

        if ($this->container['typeId'] === null) {
            return false;
        }
        if ($this->container['quantity'] === null) {
            return false;
        }
        if ($this->container['locationId'] === null) {
            return false;
        }
        if ($this->container['locationType'] === null) {
            return false;
        }
        $allowedValues = $this->getLocationTypeAllowableValues();
        if (!in_array($this->container['locationType'], $allowedValues)) {
            return false;
        }
        if ($this->container['itemId'] === null) {
            return false;
        }
        if ($this->container['locationFlag'] === null) {
            return false;
        }
        $allowedValues = $this->getLocationFlagAllowableValues();
        if (!in_array($this->container['locationFlag'], $allowedValues)) {
            return false;
        }
        if ($this->container['isSingleton'] === null) {
            return false;
        }
        return true;
    }
184402
public function valid()
    {

        if ($this->container['created'] === null) {
            return false;
        }
        if ($this->container['name'] === null) {
            return false;
        }
        $allowedValues = $this->getNameAllowableValues();
        if (!in_array($this->container['name'], $allowedValues)) {
            return false;
        }
        if ($this->container['status'] === null) {
            return false;
        }
        $allowedValues = $this->getStatusAllowableValues();
        if (!in_array($this->container['status'], $allowedValues)) {
            return false;
        }
        if ($this->container['updated'] === null) {
            return false;
        }
        return true;
    }
1246548
protected function validate()
    {
        $props = $this->getProperties();
        foreach ($props as $name => $oneProperty) {
            $options = [];
            if (array_key_exists(FFCST::PROPERTY_OPTIONS, $oneProperty)) {
                $options = $oneProperty[FFCST::PROPERTY_OPTIONS];
            }
            if (in_array(FFCST::OPTION_REQUIRED, $options)) {
                $getter = 'get' . \FreeFW\Tools\PBXString::toCamelCase($name, true);
                $value  = $this->$getter();
                $public = $name;
                if (array_key_exists(FFCST::PROPERTY_PUBLIC, $oneProperty)) {
                    $public = $oneProperty[FFCST::PROPERTY_PUBLIC];
                }
                if ($value === null || (is_string($value) && $value == '')) {
                    $this->addError(
                        FFCST::ERROR_REQUIRED,
                        sprintf('%s field is required !', $public),
                        \FreeFW\Core\Error::TYPE_PRECONDITION,
                        $public
                    );
                }
            }
        }
        return $this;
    }
46868
public function valid()
    {

        if ($this->container['name'] === null) {
            return false;
        }
        if (strlen($this->container['name']) > 40) {
            return false;
        }
        if (strlen($this->container['name']) < 1) {
            return false;
        }
        $allowedValues = $this->getColorAllowableValues();
        if (!in_array($this->container['color'], $allowedValues)) {
            return false;
        }
        return true;
    }
693555
public function valid()
    {
        echo "\n", __METHOD__, "\n";
        $key = key($this->values);
        var_export($key);

        return ($key !== null && $key !== false);
    }
52668
public function validate() {
        $validated = TRUE;

        foreach($this->getFormElements() as $name => $child) {
            $validated &= $child->validate();
        }

        $validated &= $this->fireEvent("Form\onValidate", [ $this->value, $this ], TRUE, FALSE);

        return (bool)$validated;
    }
630815
public function validate()
	{
		try
		{
			Yaml\Yaml::parse($this->data);

		} catch(\Exception $e)
		{
			return false;
		}

		return true;
	}
501088
public function valid()
    {
        $map = $this->__getSerialisablePropertyMap();
        $mapKeys = array_keys($map);
        return isset($mapKeys[$this->iteratorPosition]);
    }
155901
private function validate() {
        $errors = [];

        foreach ($this->eventDetails as $key => $value) {
            if (strpos($key, 'tp_') !== false) {
                $errors[$key] = 'Property names cannot start with the reserved prefix \'tp_\'';
            }
            if (strpos($key, '.') !== false) {
                $errors[$key] = 'Property names cannot contain a period (.)';
            }
            if (strcmp($key, '_id') == 0) {
                $errors[$key] = 'Top level properties cannot be named \'_id\'';
            }
        }

        if (!empty($errors)) {
            throw new InvalidPropertyNameException($errors);
        }
    }