Checks if a given string looks like a valid email.
@param fieldDefinition The field_definition for this field.
@param fieldName The name of the current field
@return The check
160444
function createCheckEmail(fieldDefinition, fieldName) {
  const severity = propertyHelper.getSeverity(fieldDefinition);

  // return getIteratorFunction: function (fieldName, defaultValue, checkProperties, checkFunction, getErrorFunction,
  // 	getValueIfErrorFunction, getValueIfOkFunction) {

  let errorInfo = {
    severity: severity,
    errorCode: 'NOT_EMAIL'
  };

  return functionHelper.getParserCheck(errorInfo, getEmailIfValid, fieldName, undefined);

}
1155741
public boolean hasField(final String fieldName) {
        for (final ClassInfo ci : getOverrideOrder()) {
            if (ci.hasDeclaredField(fieldName)) {
                return true;
            }
        }
        return false;
    }
440558
public <T> T getField(String fieldName, Class<T> clazz) {
        return DPathUtils.getValue(fieldData, fieldName, clazz);
    }
511514
private static String computeJsExtensionName(FieldDescriptor field) {
    String name = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, field.getName());
    return field.isRepeated() ? name + "List" : name;
  }
1089858
private boolean matchesField(Format.Field attribute, int field) {
        if (this.attribute != null) {
            return this.attribute.equals(attribute);
        }
        return (field == this.field);
    }
109941
public static boolean isEmail(final String string) {
        if (StringUtils.isBlank(string)) {
            return false;
        }

        if (MAX_EMAIL_LENGTH < string.length()) {
            return false;
        }

        final String[] parts = string.split("@");

        if (2 != parts.length) {
            return false;
        }

        final String local = parts[0];

        if (MAX_EMAIL_LENGTH_LOCAL < local.length()) {
            return false;
        }

        final String domain = parts[1];

        if (MAX_EMAIL_LENGTH_DOMAIN < domain.length()) {
            return false;
        }

        return EMAIL_PATTERN.matcher(string).matches();
    }
446277
public static <X> String createFieldId(AnnotatedField<X> field) {
        return createFieldId(field.getJavaMember(), field.getAnnotations());
    }
796833
function (fieldDefinition, fieldName) {
    const fieldType = propertyHelper.getFieldType(fieldDefinition);

    if (fieldType === 'date') {
      // This field is a date field. Create the checks
      return createDateChecks(fieldDefinition, fieldName);
    }
  }
721773
public CachedField getField (String fieldName) {
		for (CachedField cachedField : cachedFields.fields)
			if (cachedField.name.equals(fieldName)) return cachedField;
		throw new IllegalArgumentException("Field \"" + fieldName + "\" not found on class: " + type.getName());
	}
287908
public boolean hasDeclaredMethodAnnotation(final String methodAnnotationName) {
        for (final MethodInfo mi : getDeclaredMethodInfo()) {
            if (mi.hasAnnotation(methodAnnotationName)) {
                return true;
            }
        }
        return false;
    }
1029953
public function verifyNewFieldDefinitionFormExists(string $fieldName): void
    {
        $form = $this->context->getElementByText(sprintf($this::NEW_FIELD_TITLE_PATTERN, EzFieldElement::getFieldInternalNameByName($fieldName)), $this->fields['fieldDefinitionName']);
        if ($form === null) {
            throw new \Exception('Field definition not added to the form.');
        }
    }
1364049
private static String[] getDefinedFonts(Context ctx, Field[] fields) {
        ArrayList<String> fieldArray = new ArrayList<>();
        for (Field field : fields) {
            if (field.getName().contains("define_font_")) {
                fieldArray.add(getStringResourceByName(ctx, field.getName()));
            }
        }
        return fieldArray.toArray(new String[0]);
    }
1314801
public static String getDidYouMeanMessageForProtoFields(
      ImmutableSet<String> fields, Descriptor descriptor, String fieldName) {
    // TODO(b/27616446): when we have case enum support add a case here.
    if (fields.contains(fieldName + "List")) {
      return String.format(" Did you mean '%sList'?", fieldName);
    } else if (fields.contains(fieldName + "Map")) {
      return String.format(" Did you mean '%sMap'?", fieldName);
    } else {
      return getDidYouMeanMessage(fields, fieldName);
    }
  }
223514
public function getIndexData(Field $field, FieldDefinition $fieldDefinition)
    {
        if (empty($field->value->data)) {
            return array();
        }

        $nameList = array();
        $IDCList = array();
        $alpha2List = array();
        $alpha3List = array();

        foreach ($field->value->data as $alpha2) {
            if (isset($this->countriesInfo[$alpha2])) {
                $nameList[] = $this->countriesInfo[$alpha2]['Name'];
                $IDCList[] = $this->countriesInfo[$alpha2]['IDC'];
                $alpha2List[] = $this->countriesInfo[$alpha2]['Alpha2'];
                $alpha3List[] = $this->countriesInfo[$alpha2]['Alpha3'];
            }
        }

        return array(
            new Search\Field(
                'idc',
                $IDCList,
                new Search\FieldType\MultipleIntegerField()
            ),
            new Search\Field(
                'alpha2',
                $alpha2List,
                new Search\FieldType\MultipleStringField()
            ),
            new Search\Field(
                'alpha3',
                $alpha3List,
                new Search\FieldType\MultipleStringField()
            ),
            new Search\Field(
                'name',
                $nameList,
                new Search\FieldType\MultipleStringField()
            ),
            new Search\Field(
                'sort_value',
                $field->value->sortKey,
                new Search\FieldType\StringField()
            ),
            new Search\Field(
                'fulltext',
                $nameList,
                new Search\FieldType\FullTextField()
            ),
        );
    }
592925
protected String getUserDefinedFieldName(String field) {
        int index = field.indexOf('-');
        char letter = getUserDefinedFieldLetter();

        for (int i = 0; i < index; ++i) {
            if (field.charAt(i) == letter) {
                return field.substring(index + 1);
            }
        }

        return null;
    }
347450
private boolean matchesField(Format.Field attribute) {
        if (this.attribute != null) {
            return this.attribute.equals(attribute);
        }
        return false;
    }
823373
@Override public final String getHeaderField(String fieldName) {
    try {
      return fieldName == null
          ? StatusLine.get(getResponse().getResponse()).toString()
          : getHeaders().get(fieldName);
    } catch (IOException e) {
      return null;
    }
  }