private static boolean checkString(PsiElement propValue,
                                  JsonSchemaObject schema,
                                  JsonValidationHost consumer,
                                  @NotNull JsonComplianceCheckerOptions options) {
    String v = getValue(propValue, schema);
    if (v == null) return true;
    final String value = StringUtil.unquoteString(v);
    if (schema.getMinLength() != null) {
      if (value.length() < schema.getMinLength()) {
        consumer.error(JsonBundle.message("schema.validation.string.shorter.than", schema.getMinLength()), propValue, JsonErrorPriority.LOW_PRIORITY);
        return false;
      }
    }
    if (schema.getMaxLength() != null) {
      if (value.length() > schema.getMaxLength()) {
        consumer.error(JsonBundle.message("schema.validation.string.longer.than", schema.getMaxLength()), propValue, JsonErrorPriority.LOW_PRIORITY);
        return false;
      }
    }
    if (schema.getPattern() != null) {
      if (schema.getPatternError() != null) {
        consumer.error(JsonBundle.message("schema.validation.invalid.string.pattern", StringUtil.convertLineSeparators(schema.getPatternError())),
              propValue, JsonErrorPriority.LOW_PRIORITY);
        return false;
      }
      if (!schema.checkByPattern(value)) {
        consumer.error(JsonBundle.message("schema.validation.string.violates.pattern", StringUtil.convertLineSeparators(schema.getPattern())), propValue, JsonErrorPriority.LOW_PRIORITY);
        return false;
      }
    }
    return true;
  }
private static boolean checkString(PsiElement propValue,
                                  JsonSchemaObject schema,
                                  JsonValidationHost consumer,
                                  @NotNull JsonComplianceCheckerOptions options)