public function set($name, $value = null) {

		$props = get_object_vars($this);

		switch ($name) {

			default :
				if (array_key_exists($name, $props)) {
					$this->$name = $value;
				} else {
					$this->input_vars->$name = $value;
				}
				break;

			case 'type' :
				$this->setType($value);
				break;

			case 'value_type' :
				$this->setValueType($value);
				break;

			case 'validation' :
			case 'validation_rules' :
				$value = (array) $value;
				foreach ($value as $rule => $expectation) {
					$this->addValidationRule($rule, $expectation);
				}
				break;

			case 'flags' :
				if (is_string($value)) {
					$value = string_to_tag_array($value);
				}
				$this->flags = $value;
				break;

			case 'data-icon-sizes':
				// added for BC
				$this->input_vars->icon_sizes = $value;
				break;
		}
	}
public function set($name, $value = null) {

		$props = get_object_vars($this);

		switch ($name) {

			default :
				if (array_key_exists($name, $props)) {
					$this->$name = $value;
				} else {
					$this->input_vars->$name = $value;
				}
				break;

			case 'type' :
				$this->setType($value);
				break;

			case 'value_type' :
				$this->setValueType($value);
				break;

			case 'validation' :
			case 'validation_rules' :
				$value = (array) $value;
				foreach ($value as $rule => $expectation) {
					$this->addValidationRule($rule, $expectation);
				}
				break;

			case 'flags' :
				if (is_string($value)) {
					$value = string_to_tag_array($value);
				}
				$this->flags = $value;
				break;

			case 'data-icon-sizes':
				// added for BC
				$this->input_vars->icon_sizes = $value;
				break;
		}
	}
{@inheritdoc}