openlark-validation-style

Standardize validation implementation across OpenLark crates with trim semantics and error aggregation.

103|27|Updated Apr 9, 2024
One-click install
npx skills add https://github.com/foxzool/open-lark --skill openlark-validation-style
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openlark-validation-style
Source: https://github.com/foxzool/open-lark/tree/main/.agents/skills/openlark-validation-style
Command: npx skills add https://github.com/foxzool/open-lark --skill openlark-validation-style

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenLark projects often implement their own validation logic, leading to inconsistent behavior across crates. This skill provides guidelines for when to use validate_required! macros versus validate_required functions to ensure uniform validation semantics.

Core Features & Use Cases

  • Establishes a single approach for required-field checks, including how to treat blank strings with trim semantics.
  • Guides how to aggregate multiple validation errors and when to short-circuit versus continue collecting errors.
  • Helps teams align on error messaging and integration with openlark-core's error types across feature crates.

Quick Start

Follow the recommended validation patterns in your crate to ensure consistent trimming, error reporting, and matrix coverage of common fields.

Frequently Asked Questions about openlark-validation-style

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

FAQPage Schema
How do I standardize Rust validation logic across multiple crates?

Aggregate multiple validation errors in Rust by following established guidelines for when to short-circuit versus continue collecting errors. This approach aligns error messaging and integration with openlark-core error types across feature crates.

When should I use validate_required macros versus functions in Rust?

Treat blank strings with trim semantics by applying a single established approach for required-field checks. This standardizes how trimming is handled across OpenLark crates to ensure consistent validation and error reporting.

What is the best way to handle multi-field validation checks in Rust?

The best way to handle multi-field validation checks in Rust is to apply a unified pattern that covers matrix coverage of common fields. This provides consistent failure messages and SDK risk-free usage conforming to openlark-core guidelines.

Does openlark-core support consistent error types for SDK validation?

Openlark-core supports consistent error types for SDK validation by outlining specific trim semantics and error types. This allows teams to align on error messaging and integration across feature crates for risk-free usage.