Platform validation rule generate

From forcedotcom/sf-skills · View interactive version

Platform validation rule generate is an AI agent skill from the GitHub repository forcedotcom/sf-skills. Use this skill when users need to create, modify, or validate Salesforce Validation Rules. Trigger when users mention validation rules, field validation, data quality rules, formula validation, error messages, or validation logic. Also use when users encounter validation errors, need to update formu

How to use this skill

Skill file

When to Use This Skill

Use this skill when you need to:

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

-Indicates whether the validation rule is enabled

true → Rule is enforced

false → Rule is inactive

Specific Function Guidelines

Critical Rules

  1. Formula XML Handling(MOST COMMON ERROR)
  1. Interpretation of "Update" Instructions. When receiving instructions to modify a formula, distinguish between a replacement and an addition:
  1. File Format Requirement
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.