-
Notifications
You must be signed in to change notification settings - Fork 8
Update 01. Custom Expression.md #350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update 01. Custom Expression.md #350
Conversation
added the expression for performing date format validation in dd/mm/yyy and time format validation in 24 hour format
WalkthroughThe documentation for custom expressions in flow actions was updated by adding numbered section headers, introducing new sections on date and time validation using regex patterns, and improving formatting and clarity throughout. Explanations and screenshots were added to illustrate the use of these validations in the flow builder interface. Changes
Possibly related issues
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
🚀 Deployed on https://deploy-preview-350--glific-docs.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
docs/3. Product Features/03. Flows/2. Flow Actions/Split By/01. Custom Expression.md (1)
79-79
: Remove trailing period from the headingMarkdown-lint (
MD026
) flags headings ending with punctuation.
Dropping the final.
keeps the style consistent with all other section titles.-### 7. Converting a string to lowercase. +### 7. Converting a string to lowercase
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/3. Product Features/03. Flows/2. Flow Actions/Split By/01. Custom Expression.md
(5 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/3. Product Features/03. Flows/2. Flow Actions/Split By/01. Custom Expression.md
79-79: Trailing punctuation in heading
Punctuation: '.'
(MD026, no-trailing-punctuation)
98-98: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
101-101: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
101-101: Reference links and images should use a label that is defined
Missing link or image reference definition: "0-9"
(MD052, reference-links-images)
102-102: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
103-103: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
104-104: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
107-107: Headings must start at the beginning of the line
(MD023, heading-start-left)
109-109: Unordered list indentation
Expected: 0; Actual: 1
(MD007, ul-indent)
110-110: Unordered list indentation
Expected: 0; Actual: 1
(MD007, ul-indent)
110-110: Reference links and images should use a label that is defined
Missing link or image reference definition: "0-9"
(MD052, reference-links-images)
111-111: Unordered list indentation
Expected: 0; Actual: 1
(MD007, ul-indent)
111-111: Reference links and images should use a label that is defined
Missing link or image reference definition: "0-9"
(MD052, reference-links-images)
112-112: Unordered list indentation
Expected: 0; Actual: 1
(MD007, ul-indent)
113-113: Unordered list indentation
Expected: 0; Actual: 1
(MD007, ul-indent)
🪛 LanguageTool
docs/3. Product Features/03. Flows/2. Flow Actions/Split By/01. Custom Expression.md
[style] ~96-~96: Consider a more concise word here.
Context: ...alendar menu to select and enter dates. In order to accomplish collection of cleaner date f...
(IN_ORDER_TO_PREMIUM)
[grammar] ~100-~100: Ensure spelling is correct
Context: ...se "split by" node or in your "wait for resposne" include the validation condition for "...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~109-~109: Ensure spelling is correct
Context: ...t in 24 hour format - Use "Split by" nodee or in the "wait for response' node incl...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[uncategorized] ~113-~113: Do not mix variants of the same word (‘customize’ and ‘customise’) within a single text.
Context: ...ill be used as delimiter - This can be customized as needed <img width="678" height="480...
(EN_WORD_COHERENCY)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Test deployment
- GitHub Check: build
- GitHub Check: Analyze (javascript-typescript)
**To capture the date in DD/MM/YYYY format** | ||
|
||
- Use "split by" node or in your "wait for resposne" include the validation condition for "matches regex" and check the following `^(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/(?:202[5-9]|2030)$`. This is how it works: | ||
- (0[1-9]|[12][0-9]|3[01]) will check that the DD values ( numbers before the "/") is greater than 0 and less than 31. | ||
- (0[1-9]|1[0-2]) will check if the MM values dont exceed 12. | ||
- (?:202[5-9]|2030) - makes sure that the year entered is in the range of 2025-2030. | ||
- This can be customised as needed to make it MM/DD/YYYY or DD-MM-YYYY | ||
<img width="678" height="474" alt="Screenshot 2025-07-11 at 2 30 17 PM" src="https://github.com/user-attachments/assets/62a2ce27-621a-4075-9a71-7a0e8501ffce" /> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-format section 8 and fix spelling/indentation issues
Several markdown-lint violations (MD036
, MD007
, MD052
) plus a typo (resposne
) occur in this block.
The patch below converts the bold text to a proper heading, adds fenced code for the regex (prevents the []
inside the pattern being parsed as links) and normalises bullet indentation.
-**To capture the date in DD/MM/YYYY format**
-- Use "split by" node or in your "wait for resposne" include the validation condition for "matches regex" and check the following `^(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/(?:202[5-9]|2030)$`. This is how it works:
- - (0[1-9]|[12][0-9]|3[01]) will check that the DD values ( numbers before the "/") is greater than 0 and less than 31.
- - (0[1-9]|1[0-2]) will check if the MM values dont exceed 12.
- - (?:202[5-9]|2030) - makes sure that the year entered is in the range of 2025-2030.
- - This can be customised as needed to make it MM/DD/YYYY or DD-MM-YYYY
+#### Capturing the date in DD/MM/YYYY format
+
+- Use a **Split by** node or, in your **Wait for response** node, add a **Matches regex** validation with:
+
+ ```regex
+ ^(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/(?:202[5-9]|2030)$
+ ```
+
+ - `(0[1-9]|[12][0-9]|3[01])` ensures the **DD** part is between 01 – 31
+ - `(0[1-9]|1[0-2])` ensures the **MM** part does not exceed 12
+ - `(?:202[5-9]|2030)` restricts the **YYYY** part to the range 2025-2030
+ - Adapt the pattern as needed for `MM/DD/YYYY`, `DD-MM-YYYY`, etc.
🧰 Tools
🪛 LanguageTool
[grammar] ~100-~100: Ensure spelling is correct
Context: ...se "split by" node or in your "wait for resposne" include the validation condition for "...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.17.2)
98-98: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
101-101: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
101-101: Reference links and images should use a label that is defined
Missing link or image reference definition: "0-9"
(MD052, reference-links-images)
102-102: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
103-103: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
104-104: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
🤖 Prompt for AI Agents
In docs/3. Product Features/03. Flows/2. Flow Actions/Split By/01. Custom
Expression.md around lines 98 to 106, fix markdown lint issues and a typo by
converting the bold text to a proper heading, enclosing the regex pattern in
fenced code blocks to prevent misinterpretation of brackets, correcting the
spelling of "resposne" to "response," and normalizing bullet point indentation
for clarity and consistency.
### 9. Validating time format in 24 hour format | ||
|
||
- Use "Split by" nodee or in the "wait for response' node include the validation condition for "matches regex" and check the following `([01][0-9]|2[0-3]):([0-5][0-9])$` | ||
- ([01][0-9]|2[0-3]) will check if the hour part of it lies between 00 to 24 | ||
- ([0-5][0-9]) will check if the minutes part of the | ||
- colon (:) will be used as delimiter | ||
- This can be customized as needed | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heading mis-aligned, typo “nodee”, and hour-range explanation off by one
MD023
flags the leading space before the heading; bullets have wrong indent; “nodee” is misspelled; and the text claims the hour range is 00-24 while the pattern correctly limits it to 23.
- ### 9. Validating time format in 24 hour format
- - Use "Split by" nodee or in the "wait for response' node include the validation condition for "matches regex" and check the following `([01][0-9]|2[0-3]):([0-5][0-9])$`
- - ([01][0-9]|2[0-3]) will check if the hour part of it lies between 00 to 24
- - ([0-5][0-9]) will check if the minutes part of the
- - colon (:) will be used as delimiter
- - This can be customized as needed
+### 9. Validating time format in 24-hour notation
+
+- Use a **Split by** node or, in the **Wait for response** node, add a **Matches regex** validation with:
+ ```regex
+ ([01][0-9]|2[0-3]):([0-5][0-9])$
+ ```
+ - `(0[0-9]|1[0-9]|2[0-3])` ensures the **hour** part is between 00 – 23
+ - `([0-5][0-9])` ensures the **minutes** part is between 00 – 59
+ - The colon (`:`) separates hours and minutes
+ - Adjust the pattern if you need to capture seconds
🧰 Tools
🪛 LanguageTool
[grammar] ~109-~109: Ensure spelling is correct
Context: ...t in 24 hour format - Use "Split by" nodee or in the "wait for response' node incl...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[uncategorized] ~113-~113: Do not mix variants of the same word (‘customize’ and ‘customise’) within a single text.
Context: ...ill be used as delimiter - This can be customized as needed <img width="678" height="480...
(EN_WORD_COHERENCY)
🪛 markdownlint-cli2 (0.17.2)
107-107: Headings must start at the beginning of the line
(MD023, heading-start-left)
109-109: Unordered list indentation
Expected: 0; Actual: 1
(MD007, ul-indent)
110-110: Unordered list indentation
Expected: 0; Actual: 1
(MD007, ul-indent)
110-110: Reference links and images should use a label that is defined
Missing link or image reference definition: "0-9"
(MD052, reference-links-images)
111-111: Unordered list indentation
Expected: 0; Actual: 1
(MD007, ul-indent)
111-111: Reference links and images should use a label that is defined
Missing link or image reference definition: "0-9"
(MD052, reference-links-images)
112-112: Unordered list indentation
Expected: 0; Actual: 1
(MD007, ul-indent)
113-113: Unordered list indentation
Expected: 0; Actual: 1
(MD007, ul-indent)
🤖 Prompt for AI Agents
In docs/3. Product Features/03. Flows/2. Flow Actions/Split By/01. Custom
Expression.md around lines 107 to 114, fix the heading alignment by removing the
leading space, correct the typo "nodee" to "node", and update the explanation of
the hour range to accurately reflect that the regex limits hours from 00 to 23.
Also, adjust the bullet indentation to be consistent and clarify the regex
description as suggested.
added the expression for performing date format validation in dd/mm/yyy and time format validation in 24 hour format.
Use this flow to test and verify the expressions. http://prod.glific.com/flow/configure/ee2222b3-d2cd-4def-b804-369e45eb15fd
Summary by CodeRabbit