drupal-form-validation
CommunityRobust Drupal form validation for reliable forms.
Software Engineering#drupal#form-validation#form-api#seterrorbyname#element-validate#hook-form-alter
Authoredutrul
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Drupal form validation is error-prone and repetitive; this skill encapsulates best practices for Drupal 11 Form API validation, reducing invalid submissions and maintenance cost.
Core Features & Use Cases
- Implement server-side validation with validateForm() in FormBase classes.
- Use #element_validate for per-element validation and setError/setErrorByName for targeted errors, including nested fields.
- Extend validation with hook_form_alter for conditional rules and custom validators.
Quick Start
Create a Drupal FormBase form and implement validateForm() with setErrorByName() for field-level validation.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: drupal-form-validation Download link: https://github.com/edutrul/drupal-ai/archive/main.zip#drupal-form-validation Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.