Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80d7bcea authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Updater: Check if value is empty first

parent 4e0adb66
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -131,6 +131,9 @@ public class JsonValidator {
        }

        String value = jsonObject.optString(field, ""); // Return empty string if field doesn't exist
        if (value.isEmpty()) {
            return false;
        }

        switch (field) {
            case "datetime":
@@ -155,7 +158,7 @@ public class JsonValidator {
                // Check if it's a valid URL format
                return value.startsWith("http://") || value.startsWith("https://");
            default:
                return !value.isEmpty();
                return true;
        }
    }
}