Gdn_Validation::addValidationField PHP Method

addValidationField() protected method

Adds a fieldname to the $this->_ValidationFields collection.
protected addValidationField ( string $FieldName, array $PostedFields )
$FieldName string The name of the field to add to the $this->_ValidationFields collection.
$PostedFields array The associative array collection of field names to examine for the value of $FieldName.
    protected function addValidationField($FieldName, $PostedFields)
    {
        if (!is_array($this->_ValidationFields)) {
            $this->_ValidationFields = array();
        }
        $Value = val($FieldName, $PostedFields, null);
        $this->_ValidationFields[$FieldName] = $Value;
    }