# Limiting Validation by Domain

Validation processes often need to synchronize the provided organization by installing packages that differ from those already installed. This task can become particularly time-consuming for large projects with hundreds of packages, especially in monorepo setups with multiple independent domains.

## Using Release Configurations

To streamline the validation process and focus it on specific domains, you can use release configurations with the `--releaseconfig` flag. This approach limits the scope of validation to only the packages defined in your release configuration, significantly enhancing efficiency and reducing validation time.

### Basic Usage

```bash
sfp validate org -o ci \
                 -v devhub \
                 --mode thorough \
                 --releaseconfig=config/release-domain-sales.yml
```

In this example, validation is limited to packages defined in the `release-domain-sales.yml` configuration file. Only packages that:

1. Are listed in the release configuration AND
2. Have changes compared to what's installed in the org

will be validated.

### Multiple Domain Configurations

For projects with multiple independent domains, you can specify multiple release configurations:

```bash
sfp validate org -o ci \
                 -v devhub \
                 --mode thorough \
                 --releaseconfig config/release-sales.yml \
                 --releaseconfig config/release-service.yml
```

## Benefits of Domain-Limited Validation

1. **Faster Feedback**: Validate only the relevant packages for your team's domain
2. **Reduced Dependencies**: Avoid failures from unrelated packages in other domains
3. **Parallel Development**: Multiple teams can work independently without blocking each other
4. **Optimized CI/CD**: Shorter validation times mean more efficient pipeline execution

## Example Release Configuration

```yaml
# config/release-sales.yml
name: Sales Domain
includeOnlyPackages:
  - sales-core
  - sales-ui
  - sales-integrations
  - opportunity-management
  - quote-management
skipPackages:
  - sales-deprecated
```

## Combining with Other Options

### With Diff Check

```bash
sfp validate org -o ci \
                 -v devhub \
                 --diffcheck \
                 --releaseconfig=config/release.yml
```

### With Individual Mode

```bash
sfp validate org -o ci \
                 -v devhub \
                 --mode individual \
                 --releaseconfig=config/release.yml
```

### With Branch References

```bash
sfp validate org -o ci \
                 -v devhub \
                 --ref feature-branch \
                 --baseRef main \
                 --releaseconfig=config/release.yml
```

## Best Practices

1. **Organize by Domain**: Create separate release configurations for each logical domain
2. **Keep Configurations Updated**: Regularly review and update package lists in release configs
3. **Use in CI/CD**: Automate domain-specific validation in your pipeline
4. **Document Dependencies**: Clearly document cross-domain dependencies in your configurations

> **Note**: The deprecated `--mode=thorough-release-config` and `--mode=ff-release-config` have been replaced by using the standard modes with the `--releaseconfig` flag. This provides the same functionality with a simpler, more consistent interface.


---

# 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/validating-a-change/limiting-validation-by-domain.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.
