The &gt;list-range/&lt; element SHOULD be included only when the &lt;field/&gt; is of type "list-multi" and SHOULD be ignored
otherwise.

@param formField
338451
protected void checkListRangeConsistency(FormField formField) {
        ListRange listRange = getListRange();
        if (listRange == null) {
            return;
        }

        Long max = listRange.getMax();
        Long min = listRange.getMin();
        if ((max != null || min != null) && formField.getType() != FormField.Type.list_multi) {
            throw new ValidationConsistencyException(
                            "Field type is not of type 'list-multi' while a 'list-range' is defined.");
        }
    }
448264
function getFormFields(form) {
  // Grab all fields that are enabled, and return them as an array.
  // If enabled, remove that property and apply the field name.
  var fields = Object.keys(form.fields).reduce(function (result, fieldKey) {
    var field = _.clone(form.fields[fieldKey]);

    if (!field.enabled) {
      return result;
    }

    // Append the field to field order in case it's not present.
    if (form.fieldOrder.indexOf(fieldKey) === -1) {
      form.fieldOrder.push(fieldKey);
    }

    field.name = fieldKey;
    delete field.enabled;

    result.push(field);

    return result;
  }, []);

  // Sort fields by the defined fieldOrder.
  // Fields that are not in fieldOrder will be placed at the end of the array.
  fields.sort(function (a, b) {
    var indexA = form.fieldOrder.indexOf(a.name);
    var indexB = form.fieldOrder.indexOf(b.name);

    if (indexA === -1) {
      return 0;
    }

    if (indexB === -1) {
      return -1;
    }

    if (indexA > indexB) {
      return 1;
    }

    if (indexA < indexB) {
      return -1;
    }

    return 0;
  });

  return fields;
}
1009372
protected void validateField(int field) {
        int y;
        switch (field) {
        case DAY_OF_MONTH:
            y = handleGetExtendedYear();
            validateField(field, 1, handleGetMonthLength(y, internalGet(MONTH)));
            break;
        case DAY_OF_YEAR:
            y = handleGetExtendedYear();
            validateField(field, 1, handleGetYearLength(y));
            break;
        case DAY_OF_WEEK_IN_MONTH:
            if (internalGet(field) == 0) {
                throw new IllegalArgumentException("DAY_OF_WEEK_IN_MONTH cannot be zero");
            }
            validateField(field, getMinimum(field), getMaximum(field));
            break;
        default:
            validateField(field, getMinimum(field), getMaximum(field));
            break;
        }
    }
784397
def form_fields(self):
        

        fields = dict(self.form.fields) # pylint: disable=no-member

        fields_to_remove = set()

        for key, val in list(fields.items()):
            if isinstance(val, CheckboxValues):
                if not len(val): # pylint: disable=len-as-condition
                    del fields[key]
                elif len(val) == 1:
                    fields[key] = val.pop()
                else:
                    fields[key] = list(val)
            if isinstance(val, MultipleSelectOptions):
                if not len(val): # pylint: disable=len-as-condition
                    del fields[key]
                elif len(val) == 1:
                    fields[key] = val.pop()
                else:
                    fields[key] = list(val)

        for elem in self.form.inputs: # pylint: disable=no-member
            # Ignore elements without name
            if not elem.get('name'):
                continue

            # Do not submit disabled fields
            # http://www.w3.org/TR/html4/interact/forms.html#h-17.12
            if elem.get('disabled'):
                if elem.name in fields:
                    fields_to_remove.add(elem.name)
            elif getattr(elem, 'type', None) == 'checkbox':
                if not elem.checked:
                    if elem.name is not None:
                        if elem.name in fields and fields[elem.name] is None:
                            fields_to_remove.add(elem.name)
            else:
                if elem.name in fields_to_remove:
                    fields_to_remove.remove(elem.name)
                if elem.tag == 'select':
                    if elem.name in fields and fields[elem.name] is None:
                        if elem.value_options:
                            fields[elem.name] = elem.value_options[0]

                elif getattr(elem, 'type', None) == 'radio':
                    if fields[elem.name] is None:
                        fields[elem.name] = elem.get('value')
        for fname in fields_to_remove:
            del fields[fname]
        return fields
710194
public void handleFormElements(List<FormInput> formInputs) {
		try {
			Document dom = DomUtils.asDocument(browser.getStrippedDomWithoutIframeContent());
			for (FormInput input : formInputs) {
				LOGGER.debug("Filling in: " + input);
				setInputElementValue(formInputValueHelper.getBelongingNode(input, dom), input);
			}
		} catch (IOException | XPathExpressionException e) {
			LOGGER.error(e.getMessage(), e);
		}

	}
616382
function () {
/*Line 146 - 'AtomFormField.js' */                if (!this._created)
/*Line 147 - 'AtomFormField.js' */                    return;

/*Line 149 - 'AtomFormField.js' */                // find two way bindings...
/*Line 150 - 'AtomFormField.js' */                var e = this._element;

/*Line 152 - 'AtomFormField.js' */                if (this._contentPresenter) {
/*Line 153 - 'AtomFormField.js' */                    this._contentPresenter.appendChild(this._element.contentElement);
/*Line 154 - 'AtomFormField.js' */                }

/*Line 156 - 'AtomFormField.js' */                var ae = new AtomEnumerator($(e).find("input,select,textarea"));
/*Line 157 - 'AtomFormField.js' */                while (ae.next()) {
/*Line 158 - 'AtomFormField.js' */                    var item = ae.current();
/*Line 159 - 'AtomFormField.js' */                    this.bindEvent(item, "blur", "onFocusOut");
/*Line 160 - 'AtomFormField.js' */                    this.bindEvent(item, "change", "onFocusOut");
/*Line 161 - 'AtomFormField.js' */                }

/*Line 163 - 'AtomFormField.js' */                AtomBinder.refreshValue(this, "fieldClass");
/*Line 164 - 'AtomFormField.js' */            }
266962
def validate(self, value):
        """"""
        if value is not None:
            if not isinstance(value, list):
                raise ValidationError("field must be a list")

            for index, element in enumerate(value):
                try:
                    self.inner.validate(element)
                except ValidationError as error:
                    raise ValidationError("invalid element {}: {}".format(
                        index,
                        error.args[0],
                    ))

        super().validate(value)
694441
def formvalue (form, key):
    """"""
    field = form.get(key)
    if isinstance(field, list):
        field = field[0]
    return field
1161624
@SuppressWarnings({"unchecked", "rawtypes"})
    public void registerFieldFormatter(final String field, final Class<?> fieldType, final FieldFormatter<?> formatter,
            final boolean strippedIndex) {
        
        String fieldPath = buildFieldPath(field);
        
        if(strippedIndex) {
            // パスからインデックスやキーを削除する
            List<String> strippedPaths = new ArrayList<>();
            fieldFormatterRegistry.addStrippedPropertyPaths(strippedPaths, "", fieldPath);
            
            if(strippedPaths.size() > 0) {
                // 辞書順位並び変えて先頭に来るのが、インデックスを全て削除されたパス
                Collections.sort(strippedPaths);
                fieldPath = strippedPaths.get(0);
            }
        }
        
        fieldFormatterRegistry.registerFormatter(fieldPath, (Class)fieldType, (FieldFormatter)formatter);
        
    }
565966
private RangeAggregationBuilder rangeBuilder(MethodField field) {

        // ignore alias param
        LinkedList<KVValue> params = field.getParams().stream().filter(kv -> !"alias".equals(kv.key)).collect(Collectors.toCollection(LinkedList::new));

        String fieldName = params.poll().toString();

        double[] ds = Util.KV2DoubleArr(params);

        RangeAggregationBuilder range = AggregationBuilders.range(field.getAlias()).field(fieldName);

        for (int i = 1; i < ds.length; i++) {
            range.addRange(ds[i - 1], ds[i]);
        }

        return range;
    }
741874
@Override
  protected void removeRange(int fromIndex, int toIndex) {
    rangeCheck(fromIndex, toIndex);
    for (int i = fromIndex, j = toIndex; j < size; j++) {
      elements[i] = elements[j];
    }
    size -= (toIndex - fromIndex);
  }
941954
@Override
  public void exitMaven_ranges(VersionParser.Maven_rangesContext ctx) {
    if (ctx.getChildCount() == 3) {
      IVersionRange r1 = (IVersionRange) stack.pop();
      IVersionRange r2 = (IVersionRange) stack.pop();
      stack.push(new OrRange(r2, r1));
    }
    else {
      if (strict) {
        throw new InvalidRangeRuntimeException("Cannot have an empty set range");
      }
    }
  }
569178
private boolean isAllowed(Field field) {
        return ClassUtils.isPrimitiveOrWrapper(field.getType())
                || CharSequence.class.isAssignableFrom(field.getType())
                || List.class.isAssignableFrom(field.getType());
    }
849172
private Method[] settersMethodForField(Field field) {
    List<Method> methods = new ArrayList<>();
    for (Method method : field.getDeclaringClass().getDeclaredMethods()) {
      if (Ascii.toLowerCase(method.getName()).equals("set" + Ascii.toLowerCase(field.getName()))
          && method.getParameterTypes().length == 1) {
        methods.add(method);
      }
    }
    return methods.toArray(new Method[0]);
  }
1169387
@VisibleForTesting
    protected void isInRange(final FieldValue<?> fieldValue) {
        if (fieldValue instanceof IntegerFieldValue) {
            final int value = ((IntegerFieldValue) fieldValue).getValue();
            if (!constraints.isInRange(value)) {
                throw new IllegalArgumentException(String.format(OORANGE, value, constraints.getStartRange(), constraints.getEndRange()));
            }
        }
    }
758759
function typeOf(form) {
  var typename;

  if(isList(form)) {
    typename = "list";
  }
  else if(isAtom(form)) {
    var val = valueOf(form);
    // careful with null cause typeof null === "object"
    if(val !== null) {
      var typename = typeof val;
      if(typename === "string" && !isQuotedString(val)) {
        typename = "symbol";
      }
    }
    else typename = "null";
  }
  else if(isObject(form)) {
    typename = "object";
  }
  return typename;
}
695811
private void validateFacetFields(String[] facetFieldList) {
        if(facetFieldList == null || facetFieldList.length == 0){
            return;
        }
        for (String facetfield : facetFieldList){
            if(schema.getColumnIndex(facetfield) < 0){
                throw new IllegalArgumentException("Facet field:"+facetfield+", not found in schema");
            }
        }

    }