@ai-matrx/records 0.72.10 → 0.72.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog — @ai-matrx/records
2
2
 
3
+ ## 0.72.11
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/records/v0.72.10..npm/records/v0.72.11 -- apps/shared/records`).
7
+ No source changes intended and no consumer action required.
8
+
3
9
  ## 0.72.10
4
10
 
5
11
  Automatic changed-only republish (docs/metadata drift since the last tag — see
@@ -3604,6 +3604,20 @@ function validateTemplate(raw, options = {}) {
3604
3604
  const tz = raw.business?.timezone || "UTC";
3605
3605
  const tablesRaw = allTables(raw);
3606
3606
  const ISO_DAY = /\b\d{4}-\d{2}-\d{2}\b/;
3607
+ for (const table of tablesRaw) {
3608
+ for (const f of table.fields) {
3609
+ for (const rule of f.rules ?? []) {
3610
+ if (rule.kind !== "pattern" || typeof rule.value !== "string" || typeof rule.example !== "string") continue;
3611
+ let re = null;
3612
+ try {
3613
+ re = new RegExp(rule.value);
3614
+ } catch {
3615
+ continue;
3616
+ }
3617
+ if (!re.test(rule.example)) say(`tables (${table.token}).fields (${f.key}).rules`, `"${f.label}" shows "${rule.example}" as the way to write it, and its own pattern refuses that. Make the example match the pattern.`);
3618
+ }
3619
+ }
3620
+ }
3607
3621
  const EMAIL_SHAPE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
3608
3622
  for (const table of tablesRaw) {
3609
3623
  for (const f of table.fields.filter((x) => x.parityType === "email" || x.format === "email")) {