Set "Object unavailable" error
@param string $field
@param string $label
@return array
773462
protected function setErrorUnavailable($field, $label)
    {
        $error = $this->translation->text('@name is unavailable', array('@name' => $label));
        return $this->setError($field, $error);
    }
991980
public function errored($field = null)
    {
        if (!func_num_args()) {
            return !!$this->_errors;
        }
        return isset($this->_errors[$field]);
    }
31846
protected function setErrorInteger($field, $label)
    {
        $error = $this->translation->text('@field must be integer', array('@field' => $label));
        return $this->setError($field, $error);
    }
1335090
public static function missingSetter($entity, $field, $setter)
    {
        $source = [
            'entity' => ClassUtils::getClass($entity),
            'setter' => $setter
        ];

        if ($entity instanceof JsonApiResource) {
            $source['pointer'] = $entity->getResourceKey().'.'.$field;
        }

        return static::createUnprocessable('Setter not found for entity')
            ->error('missing-setter', $source, 'Missing field setter.');
    }
444392
public static function error($Object, $Label=null)
    {
        return self::send($Object, $Label, FirePHP::ERROR);
    }
988689
public function text($field, $label) {
        $text = new Text($field, $label);
        array_push($this->_elements, $text);

        return $text;
    }
1229595
public function select($key, $label, FormOptions $options=null, array $attr=[]){
		if ( $options !== null ){
			$attr['options'] = $options;
		}
		$field = $this->factory('select', $key, $label, $attr);
		return $this->addField($field);
	}
611339
public function setLabel(string $label = ''): \RolesCapabilities\Capability
    {
        $this->label = '' !== trim($label) ? $label : ucwords(str_replace('_', ' ', $this->name));

        return $this;
    }
613350
public function setLabel($label) : self
    {
        if (!$label instanceof Label && !$label instanceof HtmlElement) {
            $label = new Label($label);
        }

        $this->label = $label;

        if (!$this->field->getId() && $this->label instanceof Label) {
            $this->label->setFor($this->field->generateId()->getId());
        }

        if (!$this->getPlaceholder() && $this->label->getContent()) {
            $this->setPlaceholder($this->label->getContent());
        }

        return $this;
    }
925646
public function checkbox($field, $label) {
        $checkbox = new Checkbox($this->_entity, $field, $label);
        array_push($this->_elements, $checkbox);

        return $checkbox;
    }
223429
public function setError($field, $error = 'Error de validación')
    {
        $this->fields[$field]['error'] = $error;
        $this->errors[$field] = $error;
        return $this;
    }
385927
public function setLabel($label)
    {
        if (!(is_scalar($label) || is_null($label))) {
            return false;
        }

        $this->label = $label;
    }
1345333
function field($label, $fieldname, $fieldtype) {
		// field type loaders
		$fieldtypes = $this->confs->read('ran/htmlform')['fieldtypes'];

		if (isset($fieldtypes[$fieldtype])) {
			$instance = $fieldtypes[$fieldtype]($this, $this->confs);
		}
		else { # assume specialized class definition with no fieldtype loader
			$class = \hlin\PHP::pnn('ran.'.ucfirst($fieldtype).'Field');
			$instance = $class::instance($this->confs);
		}

		// configure and return
		return $instance
			->set('id', $this->signature($this->fieldcounter++))
			->set('name', $fieldname)
			->form_is($this)
			->fieldlabel_is($label)
			->fieldtemplate_is($this->fieldtemplate($fieldtype))
			->fieldconfigurer_is($this->fieldconfigurer($fieldtype))
			->hintrenderer_is($this->hintrenderer($fieldtype))
			->errorrenderer_is($this->errorrenderer($fieldtype))
			->adderrors($this->errors($fieldname));
	}
611650
public function setLabel($label)
        {
            if (null !== $label && !is_string($label)) {
                throw new Exception(
                        'Invalid argument: $label must be a string or null');
            }

            $this->_label = $label;
            return $this;
        }
894261
protected function filterCompare($field, $details, $label, $message) {
        if (isset($details['value'])) {
            $value = $details['value'];
            $secondLabel = '';
        } else {
            $value = $this->getValue($details['column']);
            $secondLabel = isset($this->labels[$details['column']]) ? $this->labels[$details['column']] : ucwords(str_replace('_', ' ', $details['column']));
        }

        if (!isset($details['sign']) || '==' == $details['sign']) {
            if ($this->getValue($field) == $value) {
                return true;
            }
            throw new \Exception($message ? $message : $this->translate(isset($details['value']) ? "Invalid value!" : "$label can't be different than $secondLabel!"));
        } else {
            $result = eval("return \$this->getValue(\$field) $details[sign] \$value");
            if ($result) {
                return true;
            }
            throw new \Exception($message ? $message : $this->translate("Invalid value!"));
        }
    }
1190622
private function addRecordDataAsJsonEncodedField($key, $label)
    {
        if (!empty($this->record[$key])) {
            $this->addField(new Field($label, json_encode($this->record[$key])));
        }
    }
666632
protected function setErrorLengthRange($field, $label, $min = 1, $max = 255)
    {
        $vars = array('@min' => $min, '@max' => $max, '@field' => $label);
        $error = $this->translation->text('@field must be @min - @max characters long', $vars);
        return $this->setError($field, $error);
    }