Skip to content

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

Merged
merged 2 commits into from
Jul 17, 2025

Conversation

mahajantejas
Copy link
Collaborator

@mahajantejas mahajantejas commented Jul 11, 2025

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

  • Documentation
    • Improved clarity with numbered section headers and consistent formatting.
    • Added sections on validating date (DD/MM/YYYY, 2025-2030) and time (24-hour) formats using regex, with explanations and screenshots.
    • Clarified usage instructions for string concatenation and lowercase conversion.

added the expression for performing date format validation in dd/mm/yyy and time format validation in 24 hour format
Copy link
Contributor

coderabbitai bot commented Jul 11, 2025

Walkthrough

The 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

File(s) Change Summary
docs/3. Product Features/03. Flows/2. Flow Actions/Split By/01. Custom Expression.md Added numbered headers, new sections on date and time validation with regex, improved formatting, and included explanatory screenshots.

Possibly related issues

Poem

In docs we hop and leap today,
With headers clear to guide the way.
Regex for dates, and times in line,
Screenshots make the meaning shine.
A rabbit’s joy in docs anew—
For every flow, a path to pursue!
🐇✨


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

github-actions bot commented Jul 11, 2025

@github-actions github-actions bot temporarily deployed to pull request July 11, 2025 11:31 Inactive
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 heading

Markdown-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

📥 Commits

Reviewing files that changed from the base of the PR and between 562bd5a and 433d190.

📒 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)

Comment on lines +98 to +106
**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" />

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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.

Comment on lines +107 to +114
### 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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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.

@github-actions github-actions bot temporarily deployed to pull request July 11, 2025 12:42 Inactive
@SangeetaMishr SangeetaMishr merged commit 47356b7 into main Jul 17, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants