Platform Validation Rule Generate
Declarative Salesforce validation rule builder that writes, edits, and checks error-condition formulas with metadata XML.
- CCM score
- 63 of 100
- skills.sh installs
- 6.5K
- GitHub stars
- 1.2K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers creating, modifying, and validating Validation Rules, including formula updates and deployment error troubleshooting
- Specifies rule properties (
fullName,active,errorConditionFormula,errorMessage) with naming and 255-character message limits - Enforces function-specific rules for TEXT, CASE, VALUE, DAY, MONTH, DATEVALUE, ISPICKVAL, and ISCHANGE, and CDATA wrapping for formulas containing XML
- Designed for Salesforce admins and developers who need data-layer business rules; output files use the
.validationRule-meta.xmlextension
Install
$ npx -y skills add forcedotcom/sf-skills --skill platform-validation-rule-generate -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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.
Details
- Repository
- github.com/forcedotcom/sf-skills
- Category
- Backend & APIs
- First seen
- Jul 14, 2026
Questions
What does the platform-validation-rule-generate skill do?
It creates, modifies, and validates Salesforce Validation Rules, which evaluate a formula when a record is saved and block the save when the formula returns TRUE. It also writes the rule metadata with formulas and error messages, and helps troubleshoot validation rule deployment errors.
How do I install the platform-validation-rule-generate skill?
Run npx -y skills add forcedotcom/sf-skills --skill platform-validation-rule-generate -y in your project. Once installed, the agent can handle validation rule work such as enforcing business rules at the data layer.
When should I use the platform-validation-rule-generate skill?
Use it when you need to enforce data quality on Salesforce objects, prevent invalid records from being saved, or fix validation errors. It also applies when you need to update a validation formula or add business logic validation.
More from forcedotcom/sf-skills
All 78- Platform Flexipage Generate6.5K
- Dx Org Manage6.4K
- Platform Data Manage6.4K
- Platform Sharing Rules Generate6.4K
- Platform Metadata Api Context Get6.3K
- Design Systems Slds Apply6.3K
- Design Systems Slds Validate6.1K
- Platform Custom Tab Generate6.1K
- Agentforce Generate6.1K
- Dx Code Analyzer Configure6K
- Platform Custom Application Generate6K
- Platform List View Generate6K
- Agentforce Architecture Analyze5.9K
- Dx Org Switch5.9K
- Dx Org Permission Set Assign5.9K
- Platform Custom Lightning Type Generate5.9K
- Agentforce Test5.8K
- Agentforce Observe5.8K
- Platform Lightning App Coordinate5.8K
- Design Systems Slds2 Migrate5.8K
- External Diagram Mermaid Generate5.7K
- Integration Connectivity Connected App Configure5.6K
- Integration Connectivity Generate5.6K
- Agentforce D360 Analyze5.4K
Similar to Platform Validation Rule Generate
More Backend & APIsnestjs-expertjeffallan/claude-skills6.5K installsCreates and configures NestJS modules, controllers, services, DTOs, guards, and interceptors for enterprise-grade TypeScript backend applications. Use when buil
nodemcollina/skills6.5K installsProvides domain-specific best practices for Node.js development with TypeScript, covering type stripping, async patterns, error handling, streams, modules, test
platform-sharing-rules-generateforcedotcom/sf-skills6.4K installsUse this skill when users need to create, edit, delete, or manage Salesforce Sharing Rules metadata. TRIGGER when: users mention sharing rules, record sharing,
platform-metadata-api-context-getforcedotcom/sf-skills6.3K installsREQUIRED companion for Salesforce metadata generation — load this schema/API-context skill in the SAME turn as ANY metadata generation skill; if you load a gene
fullstack-guardianjeffallan/claude-skills6.3K installsBuilds security-focused full-stack web applications by implementing integrated frontend and backend components with layered security at every level. Covers the
principle-make-operations-idempotentcursor/plugins6.1K installsApply when designing commands, lifecycle steps, or processing loops that run amid crashes, restarts, and retries. Converge to the same end state regardless of p