uc-apx create validation
Splice a validation construct into a page. The --type flag picks
the validation shape; supported kebab values are: function-body-boolean, no-rows-returned, not-null, numeric, plsql-expression, regexp, rows-returned, sql-expression, valid-date, valid-timestamp.
Each shape has its own required inputs (—code, —item, —regexp).
uc-apx create validation [flags]| Flag | Type | Default | Description |
|---|---|---|---|
--associated-item | string | Page item that the error message attaches to (emits error.associatedItem: @<id>) | |
--code | string | PL/SQL or SQL body (literal text or @path/to/file) | |
--display-location | string | error.displayLocation (e.g. inlineInNotification) | |
--dry-run | Print rendered validation to stdout without writing | ||
--error-message | string | Error message shown when the validation fails [required] | |
--force | Overwrite an existing validation with the same id | ||
--id | string | Override the construct id (default: kebab-case of —name) | |
--item | string | Page item name (required for item-based types) | |
--name | string | Display name of the validation [required] | |
--page | string | Target page (numeric ID, alias, or name) [required] | |
--regexp | string | Regular expression (required when —type regexp) | |
--sequence | int | execution.sequence (default: max existing validation sequence + 10) | |
--server-side-condition | string | Free-form serverSideCondition body (e.g. “type=expression value=…”); mutually exclusive with —when-button-pressed | |
--type | string | Validation kind: function-body-boolean, no-rows-returned, not-null, numeric, plsql-expression, regexp, rows-returned, sql-expression, valid-date, valid-timestamp [required] | |
--when-button-pressed | string | Only run when this button was pressed (shortcut for serverSideCondition.whenButtonPressed) |
Global Flags
Section titled “Global Flags”| Flag | Type | Default | Description |
|---|---|---|---|
--app-dir | string | . | Path to the APEX application directory |
--json-pretty | Output in pretty-printed JSON (human-readable) instead of minified JSON | ||
--toon | Output in TOON format (human-readable, token-efficient) instead of JSON |
Examples (from help)
Section titled “Examples (from help)”uc-apx create validation \ --page 36 \ --name "End after Beginning" \ --type function-body-boolean \ --code @validations/end-after-beginning.plsql \ --error-message "Display From must come before Display Until."Example Generated APEXlang
Section titled “Example Generated APEXlang”Using --dry-run to preview the generated construct (no files are written):
uc-apx --app-dir examples/brookstrut create validation --page 46 --name Store Required --type not-null --item P46_STORE_NAME --error-message Please select a store. --dry-runGenerated APEXlang
validation store-required ( name: Store Required execution { sequence: 10 } validation { type: itemIsNotNull item: P46_STORE_NAME } error { errorMessage: Please select a store. } )