# Validate

Validate a change in your project repository

* [`sfp validate org`](#sfp-validate-org)
* [`sfp validate pool`](#sfp-validate-pool)

## `sfp validate org`

Validate a change in your project repository against a provided org

```
USAGE
  $ sfp validate org -o <value> --mode individual|thorough --releaseconfig <value>... [--json] [--repository
    <value>] [-e <value>] [-t <value>] [--sfp-server-url <value>] [--coveragepercent <value>] [--diffcheck]
    [--disableartifactupdate] [-g <value>...] [--ref <value> --baseRef <value>] [--orginfo] [--installdeps]
    (--disablesourcepkgoverride -v <value>) [--disableparalleltesting] [--skipTesting] [--deploywithtests]
    [--markdownoutput <value>] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -e, --email=<value>               [env: SFP_SERVER_USER] Email address for authenticated user. Ignored if
                                    --application-token is provided.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -o, --targetorg=<value>           (required) Username or alias of the target org.
  -t, --application-token=<value>   [env: SFP_SERVER_TOKEN] Application token for CI/CD authentication. Takes precedence
                                    over --email.
  -v, --devhubalias=<value>         (required) Username or alias of the Dev Hub org.
      --baseRef=<value>             The sha/ref to the base commit against which this ref will be merged into, In CI/CD
                                    platforms please pass in the full sha as opposed to branch name
      --coveragepercent=<value>     [default: 75] Minimum required percentage coverage for validating code coverage of
                                    packages with Apex classes
      --deploywithtests             Embed package apex tests in the deploy (RunSpecifiedTests with rollbackOnError=false)
                                    instead of running deploy then test as separate phases. Faster validate; coverage is
                                    read from the deploy response. Honors skipTesting and skipCoverageValidation per
                                    package descriptor.
      --diffcheck                   Only build the packages which have changed by analyzing previous tags
      --disableartifactupdate       Do not update information about deployed artifacts to the org
      --disableparalleltesting      Disable test execution in parallel, this will execute apex tests in serial
      --disablesourcepkgoverride    Disables overriding unlocked package installation as source package installation
                                    during validate
      --installdeps                 Install external package dependencies before validation
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --markdownoutput=<value>      Directory to write markdown output files
      --mode=<option>               (required) [default: thorough] validation mode
                                    <options: individual|thorough>
      --orginfo                     Display info about the org that is used for validation
      --ref=<value>                 The sha/ref that need to be validated, this should not be the merge ref in some
                                    ci/cd systems, rather the head ref of the branch that is proposed to be merged
      --releaseconfig=<value>...    (required) Path(s) to the release config file(s) defining the domain(s) to validate.
                                    Accepts a comma-separated list. Domain scoping limits validation to packages
                                    declared in the listed release config(s) and enables alwaysSync inclusion in
                                    thorough mode.
      --repository=<value>          The repository identifier. E.g `owner/repo`
      --sfp-server-url=<value>      [env: SFP_SERVER_URL] URL of the SFP server. Can be set via environment variable
                                    `SFP_SERVER_URL` or config: sfp config:set server-url
      --skipTesting                 This option skips execution of tests during validation

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Validate a change in your project repository against a provided org

EXAMPLES
  $ sfp validate org  -o <targetorg>

  $ sfp validate org  -o <targetorg> --skipTesting
```

*See code:* [*src/commands/validate/org.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp validate pool`

Validate a change in your project repository against a scratch org prepared by the prepare command

```
USAGE
  $ sfp validate pool -p <value>... -v <value> --mode individual|thorough --releaseconfig <value>... [--json]
    [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url <value>] [--installdeps] [--coveragepercent
    <value>] [--disablesourcepkgoverride] [-x] [--orginfo] [--keys <value>] [--ref <value> --baseRef <value>] [--tag
    <value>] [--disableparalleltesting] [--disablediffcheck] [--skipTesting] [--deploywithtests]
    [--disableartifactupdate] [--markdownoutput <value>] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -e, --email=<value>                 [env: SFP_SERVER_USER] Email address for authenticated user. Ignored if
                                      --application-token is provided.
  -g, --logsgroupsymbol=<value>...    Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                      opening group, and an optional closing group symbol.
  -p, --pools=<value>...              (required) Fetch scratch-org validation environment from one of listed pools,
                                      sequentially
  -t, --application-token=<value>     [env: SFP_SERVER_TOKEN] Application token for CI/CD authentication. Takes
                                      precedence over --email.
  -v, --targetdevhubusername=<value>  (required) Username or alias of the Dev Hub org.
  -x, --deletescratchorg              Delete scratch-org validation environment, after the command has finished running
      --baseRef=<value>               The sha/ref to the base commit against which this ref will be merged into, In
                                      CI/CD platforms please pass in the full sha as opposed to branch name
      --coveragepercent=<value>       [default: 75] Minimum required percentage coverage for validating code coverage of
                                      packages with Apex classes
      --deploywithtests               Embed package apex tests in the deploy (RunSpecifiedTests with
                                      rollbackOnError=false) instead of running deploy then test as separate phases.
                                      Faster validate; coverage is read from the deploy response. Honors skipTesting and
                                      skipCoverageValidation per package descriptor.
      --disableartifactupdate         Do not update information about deployed artifacts to the org
      --disablediffcheck              Disables diff check while validating, this will validate all the packages in the
                                      repository
      --disableparalleltesting        Disable test execution in parallel, this will execute apex tests in serial
      --disablesourcepkgoverride      Disables overriding unlocked package installation as source package installation
                                      during validate
      --installdeps                   Install external package dependencies before validation
      --keys=<value>                  Keys to be used while installing any managed package dependencies. Required format
                                      is a string of key-value pairs separated by spaces e.g. packageA:pw123
                                      packageB:pw123 packageC:pw123
      --loglevel=<option>             [default: info] logging level for this command invocation
                                      <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --markdownoutput=<value>        Directory to write markdown output files
      --mode=<option>                 (required) [default: thorough] validation mode
                                      <options: individual|thorough>
      --orginfo                       Display info about the org that is used for validation
      --ref=<value>                   The sha/ref that need to be validated, this should not be the merge ref in some
                                      ci/cd systems, rather the head ref of the branch that is proposed to be merged
      --releaseconfig=<value>...      (required) Path(s) to the release config file(s) defining the domain(s) to
                                      validate. Accepts a comma-separated list. Domain scoping limits validation to
                                      packages declared in the listed release config(s) and enables alwaysSync inclusion
                                      in thorough mode.
      --repository=<value>            The repository identifier. E.g `owner/repo`
      --sfp-server-url=<value>        [env: SFP_SERVER_URL] URL of the SFP server. Can be set via environment variable
                                      `SFP_SERVER_URL` or config: sfp config:set server-url
      --skipTesting                   This option skips execution of tests during validation
      --tag=<value>                   Tag the build with a label, useful to identify in metrics

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Validate a change in your project repository against a scratch org prepared by the prepare command

EXAMPLES
  $ sfp validate -p "POOL_TAG_1,POOL_TAG_2" -v <devHubUsername>
```

*See code:* [*src/commands/validate/pool.ts*](https://source.flxbl.io/flxbl/sfp-pro)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp/sfp-community/cli-reference-v50-and-below/advanced/validate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
