Skip to content
This page View Markdown Open in ChatGPT Open in Claude

Is valid data for table

g.sys.system.isValidDataForTable calls the is valid data for table system API from your code, whatever the settings of that API say about HTTP callers.

Validate table data

Test data valid or not using global object 'g'.

1
2
3
4
5
6
7
await g.sys.system.isValidDataForTable({
    instance: "INSTANCE_NAME", database: 'DB_NAME', collection: "COLLECTION_NAME",
    data: {
        "field": "fieldValue",
        "field": "fieldValue"
    }
});
await g.sys.system.isValidDataForTable({
    instance: "mongoDB",
    database: "db_inventory",
    collection: "tbl_customers",
    data: {
        "customer_id": 1,
        "first_name": "Bob",
        "last_name": "Lin",
        "last_update": "2006-02-14T23:04:33.000Z",
        "pincode": 382330,
        "isActive": 1
    }
});