Returns whether the field in question is required. This will usually display '*' next to the
field.

@param string $fieldName

@return bool
540699
public function fieldIsRequired($fieldName)
    {
        $required = false;

        $constraints = $this->getConstraints($fieldName);
        if ($constraints) {
            foreach ($constraints as $constraint) {
                if ($constraint instanceof Constraint_required) {
                    $required = true;
                    break;
                }
            }
        }

        return $required || parent::fieldIsRequired($fieldName);
    }
1059644
public function input($fieldName)
    {
        if ($this->isMethod('post')) {
            return (isset($_POST[$fieldName])) ? $_POST[$fieldName] : '';
        }

        if ($this->isMethod('get')) {
            return (isset($_GET[$fieldName])) ? $_GET[$fieldName] : '';
        }

        if ($this->isMethod('put')) {
            parse_str(file_get_contents("php://input"), $PUT);

            return (isset($PUT[$fieldName])) ? $PUT[$fieldName] : '';
        }

        if ($this->isMethod('patch')) {
            parse_str(file_get_contents("php://input"), $PATCH);

            return (isset($PATCH[$fieldName])) ? $PATCH[$fieldName] : '';
        }

        if ($this->isMethod('delete')) {
            parse_str(file_get_contents("php://input"), $DELETE);

            return (isset($DELETE[$fieldName])) ? $DELETE[$fieldName] : '';
        }
    }
431702
public boolean isField(final String fieldName) {
    if (fieldName != null) {
        return (KEYWORD_LIST.contains(
                fieldName.toUpperCase(Locale.US))
                || fieldName.toUpperCase().startsWith(PROP_FIELD));
    }
    return false;
  }
642433
public function isInclude($fieldName)
    {
        if ($this->hasField($fieldName) === false) {
            return false;
        }

        $class = __CLASS__;

        return ($this->mapping[$fieldName]['include'] instanceof $class);
    }
1103966
public function isRequired()
    {
        $isRequired = $this->attribs['required'];
        if (\is_string($isRequired)) {
            $replaced = \preg_replace('/{{(.*?)}}/', '$this->form->getField("$1")->val()', $isRequired);
            $evalString = '$isRequired = (bool) '.$replaced.';';
            eval($evalString);
        }
        return $isRequired;
    }
670665
public function getField($fieldName = '')
    {
        if (isset($this->fieldData[$fieldName])) {
            return $this->fieldData[$fieldName];
        }
        $this->debugMessage[] = 'GET FIELD: Missing field name in getField: ' . $fieldName;
        return false;
    }
835910
public static function isValid($validation, $fieldname) {
    // No validation means you dont want to validate, so return affirmative.
    if (!$validation) {
      return true;
    }

    // Get filename.
    $filename = explode(".", $_FILES[$fieldname]["name"]);

    // Validate uploaded files.
    // Do not use $_FILES["file"]["type"] as it can be easily forged.
    $finfo = finfo_open(FILEINFO_MIME_TYPE);
    $mimeType = self::getMimeType($_FILES[$fieldname]["tmp_name"]);

    // Validation is a function provided by the user.
    if ($validation instanceof \Closure) {
        return $validation($_FILES[$fieldname]["tmp_name"], $mimeType);
    }

    if (is_array($validation)) {
      return self::isFileValid($filename, $mimeType, $validation['allowedExts'], $validation['allowedMimeTypes']);
    }

    // Else: no specific validating behaviour found.
    return false;
  }
111828
public function hasField( $name )
	{
		$name	= strtolower( $name );
		if( isset( $this->fields[$name] ) )
			return (bool) count( $this->fields[$name] );
	}
916378
function isPropertySet ($fieldName)
  {
    return isset($this->props->$fieldName)
      ? $this->props->$fieldName !== ''
      : $this->isBound ($fieldName);
  }
868644
protected function _getFieldStatus($fieldName)
    {
        $allField = $this->_getAllFields(true);
        if (isset($allField[strtolower($fieldName) . "_1"])) {
            return 1;
        }

        return 0;
    }
346285
public function HasField ($fieldOrFieldName = NULL) {
		$fieldName = NULL;
		if ($fieldOrFieldName instanceof \MvcCore\Ext\Forms\IField) {
			$fieldName = $fieldOrFieldName->GetName();
		} else if (is_string($fieldOrFieldName)) {
			$fieldName = $fieldOrFieldName;
		}
		return isset($this->fields[$fieldName]);
	}
152632
public function getFieldBc($fieldName)
    {
        if (array_key_exists($fieldName, $this->bcFields)) {
            return $this->bcFields[$fieldName];
        }

        return $fieldName;
    }
1332959
protected function _canFieldBeNull($fieldName)
    {
        $metaData = $this->_getAllFields();
        foreach ($metaData as $metaInfo) {
            if (strcasecmp($metaInfo->name, $fieldName) == 0) {
                return !$metaInfo->not_null;
            }
        }

        return false;
    }
453037
private function verifyRequiredFieldIsAvailable($fieldId)
    {
        //====================================================================//
        // Detect List Field Names
        if (!method_exists($this, "Lists") || !self::lists()->listName($fieldId)) {
            //====================================================================//
            // Simple Field is Required but not available
            if (empty($this->in[$fieldId])) {
                return false;
            }

            return true;
        }
        //====================================================================//
        // List Field is required
        $listName = self::lists()->ListName($fieldId);
        $fieldName = self::lists()->FieldName($fieldId);
        //====================================================================//
        // Check List is available
        if (empty($this->in[$listName])) {
            return false;
        }
        //====================================================================//
        // list is a List...
        if (!is_array($this->in[$listName]) && !is_a($this->in[$listName], "ArrayObject")) {
            return false;
        }
        //====================================================================//
        // Check Field is Available
        foreach ($this->in[$listName] as $item) {
            if (empty($item[$fieldName])) {
                return false;
            }
        }

        return true;
    }
1321389
private function getField($fieldname)
    {
        if (array_key_exists($fieldname, $this->colmodel)) {
            return $this->colmodel[$fieldname];
        } else {
            return false;
        }
    }
1119564
final public static function isNullable($fieldName) {
		
		$db = Database::getInstance();
		$column = $db->describeColumn(static::TABLE_NAME, $fieldName);
		
		if (is_null($column)) {
			return NULL;
		}
		
		return ('YES'==$column->Null ? TRUE : FALSE);
		
	}
196908
public function findFieldInArray($fieldname) {
        foreach ($this->fields as $i => $field) {
            if ($fieldname == $field->getName()) {
                return $i;
            }
        }
        return null;
    }