Terminal
Terminal/Skill
Writes and fixes Salesforce validation rule metadata, including formulas and error messages, to enforce data quality rules on objects.
By Salesforce
Works with
npx skills add forcedotcom/sf-skills --skill platform-validation-rule-generateUse this skill when you need to:
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.
-Enforce business rules at the data layer -Prevent invalid or incomplete records from being saved -Display meaningful error messages to guide users
fullName
active -Indicates whether the validation rule is enabled true → Rule is enforced false → Rule is inactive
errorConditionFormula
The logical formula that evaluates record data
Must return TRUE or FALSE
If TRUE, the validation rule triggers an error
errorMessage
Maximum length: 255 characters
Formula XML Handling(MOST COMMON ERROR)
Interpretation of "Update" Instructions. When receiving instructions to modify a formula, distinguish between a replacement and an addition:
File Format Requirement
.validationRule-meta.xml extension.