It only makes sense to have "name" property inside a field if
it was used inside a form.
18979
public function renderView()
    {
        if ($this->form) {
            $this->template->trySet('name', $this->short_name);
        }

        parent::renderView();
    }
910546
def clean_value(self):
        '''
        
        '''
        # XXX cached_property is used only for set initial state
        #     this property should be set every time field data
        #     has been changed, for instance, in accept method
        python_data = self.parent.python_data
        if self.name in python_data:
            return python_data[self.name]
        return self.get_initial()
632358
def set_field_name(self):
        """"""
        assert self.pending_symbol is not None
        assert not self.value
        self.field_name = _as_symbol(self.pending_symbol, is_symbol_value=False)  # pending_symbol becomes field name
        self.pending_symbol = None  # reset pending symbol
        self.quoted_text = False
        self.line_comment = False
        self.is_self_delimiting = False
        return self
1080660
function (name, validation) {
		if (name == null && validation == null) {
			delete this.isRequired;
			return this;
		}

		return this.field(name).validate(validation);
	}
1166645
function attributable(form, c, name) {
  if (form._vals == null)
    form._vals = {};
  if (form._update == null)
    form._update = function () {
      for (var p in form._vals)
        form._vals[p].data == form._data[p];
    }
  form._vals[name] = c;
  c.on('change', function () {
    form._data[name] = c.data;
    form.emit('change');
  });
}
560109
function useField(name) {
  var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

  if (!React__default.useState) {
    throw new Error("Hooks api need react@>=16.8, Please upgrade your reactjs.");
  }

  var useState = React__default.useState,
      useLayoutEffect = React__default.useLayoutEffect,
      useRef = React__default.useRef;
  var $name;

  if (name) {
    if (typeof name === 'string') {
      $name = name;
      props.name = $name;
    } else {
      props = name;
      $name = props.name;
    }
  }

  var $formContext = useFormContext();
  /** @type {any} */

  var $this = useRef({}).current;
  /** @type {React.MutableRefObject<any[]>} */

  var callbackRef = useRef([]);
  var $registered;
  $this.$formContext = $formContext;
  $this.props = props;
  $this.$setState = $setState; // we not directly use this $state, just from $this.$state

  var _useState = useState(function () {
    $this.$$FIELD_UUID = GET_FIELD_UUID();
    $this.$fieldHandler = $registered = createHandler($this);
    var $state = $this.$fieldHandler.$$reset();
    $this.$fieldHandler.$validate();
    return $state;
  }),
      _useState2 = _slicedToArray(_useState, 2),
      setState = _useState2[1];

  if (!$registered) {
    $registered = ($formContext.$$registers || {})[$this.$fieldHandler.$name] || $this.$fieldHandler;
  }

  useLayoutEffect(function () {
    var $state = $this.$state;

    if ($this.isMounting) {
      if (!($name in ($formContext.$$registers || {}))) {
        var $prevValue = $this.$prevValue;
        $registered.$$triggerChange({
          $newValue: $state.$value,
          $prevValue: $prevValue
        });
      }
    }

    $this.$prevValue = $state.$value;
  }, [$this.$state.$value]);
  useLayoutEffect(function () {
    $this.isMounting = true;
    warning(!$name || $formContext.$formutil, "You should enusre that the useField() with the name '".concat($name, "' must be used underneath a <Form /> component or withForm() HOC, otherwise it's isolated."));
    warning($name, "You should pass a name argument to useField(), otherwise it will be isolated!");
    return function () {
      if ($formContext.$$unregister) {
        $formContext.$$unregister($name, $this.$fieldHandler, props.$reserveOnUnmount);
      }

      $this.isMounting = false;
    };
  }, []);
  useLayoutEffect(function () {
    if ($formContext.$$register) {
      $formContext.$$register($name, $this.$fieldHandler, $this.$prevName);
    }

    $this.$prevName = $name;
  }, [$name]);
  useLayoutEffect(function () {
    if (callbackRef.current.length > 0) {
      var callbackQueue = _toConsumableArray(callbackRef.current);

      callbackRef.current.length = 0;

      while (callbackQueue.length) {
        callbackQueue.pop()($this.$fieldutil);
      }
    }
  });

  function $setState($newState, callback) {
    return new Promise(function (resolve) {
      var execute = function execute() {
        return resolve(runCallback(callback, $this.$fieldutil));
      };

      if ($this.isMounting) {
        if ($name in ($formContext.$$registers || {})) {
          $formContext.$$onChange($name, $newState, execute);
        } else {
          setState($registered.$$merge($newState));
          $registered.$$detectChange($newState);
          callbackRef.current.push(execute);
        }
      } else {
        $registered.$$merge($newState);
        execute();
      }
    });
  }

  return $this.$fieldutil = _objectSpread({
    $name: $name
  }, $registered.$getState(), $registered, {
    $$formutil: $formContext.$formutil
  });
}
1346576
private String setterName(String fieldName) {
        return new StringBuilder(SET_PREFIX)
                .append(fieldName.substring(0, 1).toUpperCase(Locale.ENGLISH))
                .append(fieldName.substring(1))
                .toString();
    }
463534
function( prop ) {

    var key = prop._field

    if( Array.isArray( this.data[ key ] ) ) {
      this.data[ key ].push( prop )
    } else if( this.data[ key ] != null ) {
      this.data[ key ] = [ this.data[ key ], prop ]
    } else {
      this.data[ key ] = prop
    }

    return this

  }
756263
private static boolean setName(String ns, String name, Schema property) {
        boolean apply = false;
        final String cleanName = StringUtils.trimToNull(name);
        final String useName;
        if (!isEmpty(cleanName) && !cleanName.equals(((SchemaImpl) property).getName())) {
            useName = cleanName;
            apply = true;
        } else {
            useName = null;
        }
        final String cleanNS = StringUtils.trimToNull(ns);
        final String useNS;
        if (!isEmpty(cleanNS)) {
            useNS = cleanNS;
            apply = true;
        } else {
            useNS = null;
        }
        // Set everything or nothing
        if (apply) {
            getXml(property).name(useName).namespace(useNS);
        }
        return apply;
    }
1089704
function addField(fields) {
  for (const fieldName in fields) {
    if (reservedFieldNames.indexOf(fieldName) >= 0) {
      throw new InvalidDefinitionError(this.name, 'field %s is reserved name', fieldName);
    }
    const field = Type.createField(this, fieldName, fields[fieldName]);
    if (field.props.unique && field.props.category === 'entity') {
      let unique = field.props.unique,
        message = `${fieldName} is unique`;
      if (typeof unique === 'string') message = unique;
      const index = {
        name: `${this.table}_${field.props.column}`,
        fields: [fieldName], unique: true, message,
      };
      this.indexes.push(index);
    }

    this.fields[fieldName] = field;
  }
}
35858
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case NAME:
      return isSetName();
    case VALIDATION_CLASS:
      return isSetValidation_class();
    case INDEX_TYPE:
      return isSetIndex_type();
    case INDEX_NAME:
      return isSetIndex_name();
    case INDEX_OPTIONS:
      return isSetIndex_options();
    }
    throw new IllegalStateException();
  }
1133019
function() {
		if(this.options.name) {
			for(var i = 0 ; i < this.subFields.length ; i++) {
				var subFieldEl = this.subFields[i];
				subFieldEl.setFieldName(this.options.name+"["+i+"]");
			}
		}
	}
564264
function( field ){
    var tagName = field.tagName.toLowerCase();

    if( tagName == 'input' && field.type == 'checkbox' ){
        return field.checked;
    }

    if( tagName == 'select' ){
        return field.options[field.selectedIndex].value;
    }

    return field.value;
}
748326
def main_field= field_name
      name = field_name.to_s.alpha_numeric.to_sym
      raise ArgumentException, "Not a valid field name: #{field_name}"  if !valid_field_name?(name)
      @main_field ||= name
    end
528768
def process_form(self, instance, field, form, empty_marker=None,
                     emptyReturnsMarker=False):
        
        fieldName = field.getName()
        if fieldName + "_uid" in form:
            uid = form.get(fieldName + "_uid", '')
            if field.multiValued and\
                    (isinstance(uid, str) or isinstance(uid, unicode)):
                uid = uid.split(",")
        elif fieldName in form:
            uid = form.get(fieldName, '')
            if field.multiValued and\
                    (isinstance(uid, str) or isinstance(uid, unicode)):
                uid = uid.split(",")
        else:
            uid = None
        return uid, {}
1182410
def get_prefix(self, form, name):
        
        return '{form_prefix}{prefix_name}-{field_name}'.format(
            form_prefix=form.prefix + '-' if form.prefix else '',
            prefix_name=self.prefix_name,
            field_name=name)
1285518
function normalizeField(input) {
  assert(input.name, 'fields must have a name');

  var ret = clone(input);

  var cls = normalizeClass(input.class);
  if (cls) ret.class = cls;

  return ret;
}