forcedotcom avatar

Platform Validation Rule Generate

This generates Salesforce validation rule metadata files with proper formula syntax and error handling. It's built for creating new rules from scratch or fixing deployment errors, which is nice because validation rule formulas are notoriously finicky with XML escaping and function usage. The skill knows the common gotchas like wrapping formulas in CDATA sections, not using TEXT() on text fields, and remembering CASE() needs an even number of parameters. It also handles the ambiguity when someone says "update the formula" versus "update the formula to also" by either replacing or appending logic. If you're tired of validation rule deployment failures or just want to scaffold rules faster, this handles the boilerplate and keeps you from making the usual mistakes.

skills.sh installs
6.3K
GitHub stars
1.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add forcedotcom/sf-skills --skill platform-validation-rule-generate --agent claude-code

Installs into .claude/skills of the current project.

Files

When to Use This Skill

Use this skill when you need to:

  • Create validation rules to enforce data quality
  • Prevent invalid records from being saved
  • Generate validation rule metadata with formulas
  • Add business logic validation to objects
  • Troubleshoot deployment errors related to validation rules

Specification

ValidationRule Metadata Specification

Overview

Validation Rules are declarative metadata components used to enforce data quality and business logic in Salesforce. They evaluate a formula expression when a record is saved and prevent the save operation if the expression returns TRUE.

Purpose

-Enforce business rules at the data layer -Prevent invalid or incomplete records from being saved -Display meaningful error messages to guide users

Required Properties

Core Validation Rule Properties
  • fullName
    • The unique API name of the validation rule
    • Must start with a letter
      • Can contain letters, numbers, and underscores
    • Cannot end with an underscore
    • Cannot contain consecutive underscores
    • Cannot exceed 40 character.

Sponsors

Details

Repository
github.com/forcedotcom/sf-skills
Categories
Code Review & Quality, Debugging, Sales & Marketing
First seen
Jul 14, 2026

More from forcedotcom/sf-skills

All 158
1okx avatarokx-defi-investokx/onchainos-skillsOKX-aggregated DeFi discovery and execution — for users who want OKX to find and route to the best protocol WITHOUT naming a specific DApp. **If the user names 6.3Kskills.sh installs
2wordpress avatarwp-block-themeswordpress/agent-skillsUse when developing WordPress block themes: theme.json (global settings/styles), templates and template parts, patterns, style variations, and Site Editor troub6.3Kskills.sh installs
3affaan-m avatardjango-patternsaffaan-m/eccDjango architecture patterns, REST API design with DRF, ORM best practices, caching, signals, middleware, and production-grade Django apps.6.2Kskills.sh installs
4jeffallan avatarnestjs-expertjeffallan/claude-skillsCreates and configures NestJS modules, controllers, services, DTOs, guards, and interceptors for enterprise-grade TypeScript backend applications. Use when buil6.2Kskills.sh installs
5jimliu avatarbaoyu-image-cardsjimliu/baoyu-skillsGenerates infographic image card series with 12 visual styles, 8 layouts, and 3 color palettes. Breaks content into 1-10 cartoon-style image cards optimized for6.2Kskills.sh installs
6affaan-m avatarjava-coding-standardsaffaan-m/eccJava coding standards for Spring Boot and Quarkus services: naming, immutability, Optional usage, streams, exceptions, generics, CDI, reactive patterns, and pro6.2Kskills.sh installs