Defines a validation rule for a custom object.
import { defineValidation } from '@rippling/rippling-sdk';
Properties
| Property | Required | Type | Description |
|---|---|---|---|
apiName | Required | `${string}__c` | — |
displayName | Required | string | Display name of this validation rule shown in the UI. |
errorMessage | Required | string | User-facing error message shown when the validation fires. Pass an empty string for no message. |
level | Required | ValidationLevel | Whether the error is shown at the record level or on a specific field. One of |
rqlFormula | Required | string | RQL formula that returns Note the violation semantics: a truthy result triggers the error, not a passing check. Example: |
ruleDescription | Required | string | Internal description of this rule (for developer reference only). Pass an empty string if unused. |
state | Required | ValidationState | Whether this rule is active or inactive. One of |
fieldRef | Optional | NoInfer<DefinitionFieldReference<TObject>> | — |
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
object | Required | TObject | — |
TypeScript signature
defineValidation<TObject extends ObjectReference>(object: TObject, props: DefineValidationProps<TObject>): Validation;
Returns
Validation
Availability
| Capability | Support |
|---|---|
| Pull into a project | Supported |
| Runtime operations | Not available for this helper |