[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003e\u003ccode\u003eFieldChecker\u003c/code\u003e is a Java class designed to validate field names, language codes, and various field values such as text, HTML, atoms, and dates.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains static methods to check the validity of specific data types like \u003ccode\u003eatom\u003c/code\u003e, \u003ccode\u003edate\u003c/code\u003e, \u003ccode\u003eexpression\u003c/code\u003e, \u003ccode\u003efieldName\u003c/code\u003e, \u003ccode\u003ehtml\u003c/code\u003e, \u003ccode\u003enumber\u003c/code\u003e, \u003ccode\u003eprefix\u003c/code\u003e, \u003ccode\u003esortExpression\u003c/code\u003e, \u003ccode\u003etext\u003c/code\u003e, \u003ccode\u003evector\u003c/code\u003e, as well as the validity of a \u003ccode\u003eDocumentPb.Field\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eIt validates that field names and prefix fields conform to length and pattern constraints as defined by \u003ccode\u003eSearchApiLimits\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003echeckDate\u003c/code\u003e method throws an \u003ccode\u003eIllegalArgumentException\u003c/code\u003e if the date is outside of the acceptable range, and \u003ccode\u003eparseLocale\u003c/code\u003e returns a \u003ccode\u003eLocale\u003c/code\u003e object from a locale string.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003echeckNumber\u003c/code\u003e method verifies that a number falls within the inclusive range defined by \u003ccode\u003eSearchApiLimits#MINIMUM_NUMBER_VALUE\u003c/code\u003e and \u003ccode\u003eSearchApiLimits#MAXIMUM_NUMBER_VALUE\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Class FieldChecker (2.0.0)\n\n public final class FieldChecker\n\nProvides checks for Field names, language code, and values: text, HTML, atom\nor date. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e FieldChecker \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nStatic Methods\n--------------\n\n### checkAtom(String atom)\n\n public static String checkAtom(String atom)\n\nChecks whether an atom is valid. An atom can be null or a string between\n1 and SearchApiLimits.MAXIMUM_ATOM_LENGTH in length.\n\n### checkDate(Date date)\n\n public static Date checkDate(Date date)\n\nChecks whether a date is within range. Date is nullable.\n\n### checkExpression(String expression)\n\n public static String checkExpression(String expression)\n\nChecks whether a field expression is not null and is parsable.\n\n### checkFieldName(String name)\n\n public static String checkFieldName(String name)\n\nChecks whether a field name is valid. The field name length must be\nbetween 1 and [SearchApiLimits#MAXIMUM_NAME_LENGTH](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_MAXIMUM_NAME_LENGTH) and it should match\n[SearchApiLimits#FIELD_NAME_PATTERN](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_FIELD_NAME_PATTERN).\n\n### checkFieldName(String name, String fieldName)\n\n public static String checkFieldName(String name, String fieldName)\n\nChecks whether a field name is valid. The field name length must be\nbetween 1 and [SearchApiLimits#MAXIMUM_NAME_LENGTH](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_MAXIMUM_NAME_LENGTH) and it should match\n[SearchApiLimits#FIELD_NAME_PATTERN](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_FIELD_NAME_PATTERN).\n\n### checkHTML(String html)\n\n public static String checkHTML(String html)\n\nChecks whether a html is valid. A html can be null or a string between\n0 and SearchApiLimits.MAXIMUM_TEXT_LENGTH in length.\n\n### checkNumber(Double value)\n\n public static Double checkNumber(Double value)\n\nChecks whether a number is valid. A number can be null or a value between\n[SearchApiLimits#MINIMUM_NUMBER_VALUE](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_MINIMUM_NUMBER_VALUE) and [SearchApiLimits#MAXIMUM_NUMBER_VALUE](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_MAXIMUM_NUMBER_VALUE),\ninclusive.\n\n### checkPrefix(String prefix)\n\n public static String checkPrefix(String prefix)\n\nChecks whether a prefix field is valid. A prefix field can be null or a string between\n1 and SearchApiLimits.MAXIMUM_PREFIX_LENGTH in length.\n\n### checkSortExpression(String expression)\n\n public static String checkSortExpression(String expression)\n\nChecks whether a sort bexpression is not null and is parsable.\n\n### checkText(String text)\n\n public static String checkText(String text)\n\nChecks whether a text is valid. A text can be null, or a string between\n0 and SearchApiLimits.MAXIMUM_TEXT_LENGTH in length.\n\n### checkValid(DocumentPb.Field field)\n\n public static DocumentPb.Field checkValid(DocumentPb.Field field)\n\n### checkVector(List\\\u003cDouble\\\u003e vector)\n\n public static List\u003cDouble\u003e checkVector(List\u003cDouble\u003e vector)\n\nChecks whether a vector field is valid. A vector field can be an array of any number with size\nless than SearchApiLimits.VECTOR_FIELD_MAX_SIZE.\n\n### parseLocale(String locale)\n\n public static Locale parseLocale(String locale)\n\nReturns a [Locale](https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html) parsed from the given locale string.\n\nConstructors\n------------\n\n### FieldChecker()\n\n public FieldChecker()"]]