Skip to main content

Validation Rule Metadata Conventions

  1. The Validation Rule Name MUST try to explain in a concise manner what the validation rule prevents. Note that conciseness trumps clarity for this field.
  2. All validation Rules API names MUST be written in PascalCase.
  3. Validation Rules SHOULD NOT contain an underscore in the fields name, except where explicitly defined otherwise in these conventions.
  4. A Validation Rule SHALL always start by a shorthand of the object name (example: ACC, then the stringĀ  VR, followed by a number corresponding to the number of validation rules on the triggering Object, followed by an underscore.
  5. The Validation Rule Error Message MUST contain an error code indicating the number of the Validation Rule, in the format [VRXX], XX being the Validation Rule Number.1
  6. Validation Rules MUST have a description, where the description details the Business Use Case that is addressed by the VR. A Description SHALL NOT contain technical descriptions of what triggers the VR - the Validation Rule itself SHOULD be written in such a manner as to be clearly readable.

1 While including an error code in a user displayed message may be seen as strange, this will allow any admin or consultant to find exactly which validation rule is causing problems when user need only communicate the end code for debugging purposes.