• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

endatix / endatix-hub / 28550388110
58%
main: 57%

Build:
Build:
LAST BUILD BRANCH: feature/706-advanced-carry-forward
DEFAULT BRANCH: main
Ran 01 Jul 2026 10:01PM UTC
Jobs 1
Files 769
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Jul 2026 03:40PM UTC coverage: 56.688% (+0.08%) from 56.611%
28550388110

push

github

web-flow
feat(h705): Introduce a function for conditional logic that evaluates regex (#710)

## Description

- Adds `regexMatch(value, pattern, flags?)` as a custom SurveyJS
expression function for regex-based conditional logic (`visibleIf`,
`enableIf`, etc.)
- Follows the existing `any-answered` pattern: pure function +
`FunctionFactory` registry + React hook, registered globally before
survey/Creator initialization
- Hub-only change; no API or Creator UI work

## Behavior

- Returns `true` when the value matches the pattern, `false` otherwise
- Uses `Helpers.isValueEmpty()` so empty strings, `null`, `undefined`,
and cleared checkbox `[]` are treated as unanswered
- Coerces scalar non-string values (e.g. numbers) to strings before
matching; `0` is a valid answer
- Invalid or missing patterns/flags return `false` without throwing or
logging errors
- Optional third parameter supports regex flags (e.g. `'i'` for
case-insensitive)

## Wiring

Registers `regexMatch` at all survey runtime and Creator entry points:

- Public survey-taking view
- Submission review runtime
- Form editor (Creator)
- Form preview
- Template preview

## Tests

- Unit tests for match/mismatch, edge cases, AC patterns (4-digit,
Korean mobile, `ABC-1234`, decimals, case-insensitive yes/no)
- Integration tests via `survey.runCondition()` and `visibleIf`
visibility toggling
- 19 tests passing

## Example

```text
regexMatch({q1}, '^\d{4}$') == true
```

Type single backslashes in the Creator expression box; JSON storage will
escape them automatically.

## Related Issues
#705 

## Type of Change
Check all that apply.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Documentation update
- [ ] Dependency update
- [ ] Refactoring (non-breaking change which improves code quality)
- [ ] Other (please describe)



## Ch... (continued)

1876 of 2899 branches covered (64.71%)

Branch coverage included in aggregate %.

25 of 27 new or added lines in 5 files covered. (92.59%)

7528 of 13690 relevant lines covered (54.99%)

10.45 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
0.0
lib/survey-features/regex-match/infrastructure/regex-match.extension.ts
Jobs
ID Job ID Ran Files Coverage
1 28550388110.1 01 Jul 2026 10:01PM UTC 769
56.69
GitHub Action Run
Source Files on build 28550388110
  • Tree
  • List 769
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28550388110
  • 1324bdcd on github
  • Prev Build on main (#28467495194)
  • Next Build on feature/706-advanced-carry-forward (#28616469539)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc