Laravel validation
Skill noppu-labs/ai-toolkit/laravel/skills/laravel-validation
Toolkit for agentic development of Laravel & React apps
npx -y skills add noppu-labs/ai-toolkit --skill laravel-validationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Form request validation and comprehensive validation testing. Use when creating or modifying form requests, validation rules, or validation tests.
SKILL.md
1.5 KB, as published. Nobody here has run it
Laravel Validation
Form requests as single source of truth for validation, with comprehensive testing patterns.
Core Concepts
form-requests.md - Validation rules:
- Array-based validation rules
- Custom validation rules
- Conditional validation
- Custom error messages
- DTO transformation via
toDto()
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()(forpresent/sometimes/missingrules) - Nested array testing
- Conditional validation testing
- Real-world examples
Pattern
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.