Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

🔖 Checkpoint: Edit /workspaces/claude-code-flow/validation-test/src/validationRules.js

rUv498753048053
diff --git a/validation-test/.claude/checkpoints/1755354939.json b/validation-test/.claude/checkpoints/1755354939.json
new file mode 100644
index 0000000000..1dd2d5e896
--- /dev/null
+++ b/validation-test/.claude/checkpoints/1755354939.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250816-143539", "file": "/workspaces/claude-code-flow/validation-test/src/validator.js", "timestamp": "2025-08-16T14:35:39Z", "type": "pre-edit", "original_branch": "alpha90"}
diff --git a/validation-test/.claude/checkpoints/1755354940.json b/validation-test/.claude/checkpoints/1755354940.json
new file mode 100644
index 0000000000..2fa12973de
--- /dev/null
+++ b/validation-test/.claude/checkpoints/1755354940.json
@@ -0,0 +1 @@
+{"tag": "checkpoint-20250816-143540", "file": "/workspaces/claude-code-flow/validation-test/src/validator.js", "timestamp": "2025-08-16T14:35:40Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 24 +++ .claude-flow/metrics/task-metrics.json | 6 +- .claude/checkpoints/task-1755354870.json | 1 + claude-flow-wiki | 0 validation-test/src/validator.js | 330 +++++++++++++++++++++++++++++++ 6 files changed, 359 insertions(+), 4 deletions(-) "}
diff --git a/validation-test/src/validationRules.js b/validation-test/src/validationRules.js
new file mode 100644
index 0000000000..dfd009d9ee
--- /dev/null
+++ b/validation-test/src/validationRules.js
@@ -0,0 +1,34 @@
+// Validation Rules class
+class ValidationRules {
+ constructor() {
+ this.rules = {
+ email: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
+ phone: /^[\+]?[(]?[0-9]{1,4}[)]?[-\s\.]?[(]?[0-9]{1,4}[)]?[-\s\.]?[0-9]{1,9}$/,
+ url: /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/,
+ alphanumeric: /^[a-zA-Z0-9]+$/,
+ numeric: /^[0-9]+$/,
+ alpha: /^[a-zA-Z]+$/
+ };
+ }
+
+ getRules() {
+ return this.rules;
+ }
+
+ addRule(name, pattern) {
+ this.rules[name] = pattern;
+ }
+
+ removeRule(name) {
+ delete this.rules[name];
+ }
+
+ validate(value, ruleName) {
+ if (!this.rules[ruleName]) {
+ throw new Error(`Rule ${ruleName} not found`);
+ }
+ return this.rules[ruleName].test(value);
+ }
+}
+
+module.exports = ValidationRules;
\ No newline at end of file