fsharp-validation

Create F# validation logic with error accumulation and async checks.

1|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/heimeshoff/Cinemarco --skill fsharp-validation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fsharp-validation
Source: https://github.com/heimeshoff/Cinemarco/tree/main/.claude/skills/fsharp-validation
Command: npx skills add https://github.com/heimeshoff/Cinemarco --skill fsharp-validation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides robust, error-accumulating validation logic for API boundaries, allowing multiple errors to be collected and surfaced in a single response.

Core Features & Use Cases

  • Field Validators: validateRequired, validateLength, validateRange, etc.
  • Aggregate Errors: accumulate multiple validation errors into a list.
  • Async Validation: supports async checks for uniqueness and cross-file constraints.

Quick Start

Implement validateCreateRequest and integrate into API creation/update flows.

Frequently Asked Questions about fsharp-validation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I collect multiple validation errors in a single API response?

Error accumulation validation collects all field violations into a list rather than failing on the first error. This Skill implements validators that gather multiple errors across required fields, length constraints, ranges, patterns, and cross-field rules, returning them together so clients see the complete picture of what needs fixing.

Can I validate async operations like checking database uniqueness in F#?

Yes, this Skill supports async validation for scenarios requiring database lookups or external checks. It integrates asynchronous validators alongside synchronous field checks, enabling uniqueness constraints and cross-system validation while maintaining error accumulation across all validation types.

What's the best way to validate API requests at the boundary in F#?

Apply centralized validation logic at your API boundary using field validators for individual constraints and aggregate validators for cross-field rules. This Skill provides email, URL, length, range, and pattern validators pre-built in Validation.fs, ready to integrate into create and update request handlers.

How do I handle cross-field validation constraints in F#?

Cross-field validation checks relationships between multiple fields—for example, ensuring an end date follows a start date. This Skill includes multi-field validator patterns that evaluate related fields together and accumulate constraint violations alongside single-field errors in a unified result.

Do I need separate validation logic for create versus update operations?

This Skill provides validateCreateRequest as the primary pattern, applicable to both create and update flows at the API boundary. The same field and async validators adapt to different request types, and you apply them consistently to enforce business rules for both operations.

What validation scenarios does this approach handle beyond basic field checks?

Beyond required and format checks, this Skill covers range validation, pattern matching with regex, async uniqueness verification, and complex business rules enforced across fields. It accumulates errors from all scenarios simultaneously, surfacing complete validation feedback in one response.