From ae6b2f27684106baf94b443e0539f62a734a256c Mon Sep 17 00:00:00 2001 From: HONG QI XING Date: Mon, 7 Oct 2024 23:40:10 +0800 Subject: [PATCH 1/2] Create returnChecks.js return messages with ref to sys_properties setting --- Validation Messages/returnChecks.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Validation Messages/returnChecks.js diff --git a/Validation Messages/returnChecks.js b/Validation Messages/returnChecks.js new file mode 100644 index 0000000..49b2c20 --- /dev/null +++ b/Validation Messages/returnChecks.js @@ -0,0 +1,8 @@ +//return validation messages based on sys_properties setting +function onSubmit() { + g_form.clearMessages(); + // a. When attachment reach limits + g_form.addErrorMessage(getMessage("The uploaded attachment has reached upload limit of ") + + gs.getProperty('com.glide.attachment.max_size') + "(MB) and/or max count of attachment at " + + gs.getProperty('com.glide.cs.upload.attachment.max_count')); +} From 9ad5c255de9137f64965bbb634d5fb2ee9d7c194 Mon Sep 17 00:00:00 2001 From: HONG QI XING Date: Mon, 7 Oct 2024 23:44:21 +0800 Subject: [PATCH 2/2] Create README.md --- Validation Messages/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Validation Messages/README.md diff --git a/Validation Messages/README.md b/Validation Messages/README.md new file mode 100644 index 0000000..2ce270b --- /dev/null +++ b/Validation Messages/README.md @@ -0,0 +1 @@ +This code return messages aimed to inform user of submission error in relations to the sys_properties setting configured.