private String validate(FuzzyItem item) {
            String fieldName = item.getFieldName();
            Index index = getIndexFromUnionOfDocumentTypes(fieldName);
            if (!index.isAttribute() || !index.isString()) {
                return "Fuzzy items require a string attribute field, but '" + fieldName + "' is not";
            }
            if (item.getPrefixLength() < 0) {
                return item + " has invalid prefixLength " + item.getPrefixLength() + ": Must be >= 0";
            }
            if (item.getMaxEditDistance() < 0) {
                return item + " has invalid maxEditDistance " + item.getMaxEditDistance() + ": Must be >= 0";
            }
            if (item.stringValue().isEmpty()) {
                return item + " fuzzy query must be non-empty";
            }
            return null;
        }
Returns an error message if this is invalid, or null if it is valid
container-search/src/main/java/com/yahoo/search/searchers/ValidateFuzzySearcher.java