# Laravel Validation

> Form request validation and comprehensive validation testing. Use when creating or modifying form requests, validation rules, or validation tests.

- **Type:** Skill
- **Install:** `agentstack add skill-leeovery-agentic-skills-laravel-validation`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [leeovery](https://agentstack.voostack.com/s/leeovery)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [leeovery](https://github.com/leeovery)
- **Source:** https://github.com/leeovery/agentic-skills/tree/main/laravel/skills/laravel-validation

## Install

```sh
agentstack add skill-leeovery-agentic-skills-laravel-validation
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Laravel Validation

Form requests as single source of truth for validation, with comprehensive testing patterns.

## Core Concepts

**[form-requests.md](references/form-requests.md)** - Validation rules:
- Array-based validation rules
- Custom validation rules
- Conditional validation
- Custom error messages
- DTO transformation via `toDto()`

**[validation-testing.md](references/validation-testing.md)** - Validation testing:
- RequestDataProviderItem helper
- Pest datasets for systematic testing
- Built-in helper methods (string, email, number, date, array, boolean)
- Presence testing with `absent()` (for `present` / `sometimes` / `missing` rules)
- Nested array testing
- Conditional validation testing
- Real-world examples

## Pattern

```php
final class CreateOrderRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'user_id' => ['required', 'integer', 'exists:users,id'],
            'items' => ['required', 'array', 'min:1'],
            'items.*.product_id' => ['required', 'integer'],
            'items.*.quantity' => ['required', 'integer', 'min:1'],
        ];
    }

    public function toDto(): CreateOrderDto
    {
        return CreateOrderDto::from($this->validated());
    }
}
```

All validation lives in form requests. Test validation systematically.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [leeovery](https://github.com/leeovery)
- **Source:** [leeovery/agentic-skills](https://github.com/leeovery/agentic-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-leeovery-agentic-skills-laravel-validation
- Seller: https://agentstack.voostack.com/s/leeovery
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
