# Validating

Scaffold validate is a `stoobly-agent` CLI command used to validate application workflows.

## Background

{% content-ref url="../../../../core-concepts/scaffold/validation" %}
[validation](https://docs.stoobly.com/core-concepts/scaffold/validation)
{% endcontent-ref %}

## Command

```bash
stoobly-agent scaffold workflow validate <WORKFLOW-NAME>
```

### Arguments

<details>

<summary>&#x3C;WORKFLOW-NAME></summary>

Name of the Stoobly workflow you want to validate. Workflows available by default:

* mock
* record
* test

</details>

### Options

<details>

<summary>--app-dir-path</summary>

path to the directory where your scaffolded application is.

</details>

## Example

In this example, we have created our scaffolded application in `./app` and are looking to validate the `record` workflow. The `record` workflow comprises of two services called `example-service` and `example-custom-container-service`. Our goal with the following command is to ensure that application is ready for recording requests.

```bash
$ stoobly-agent scaffold workflow validate --app-dir-path ./app record
```

After running a series of checks and collecting the results, here's an example output:

```
Validating workflow: record

Validating core services: ['build', 'entrypoint', 'stoobly-ui', 'gateway']
Validating core service: gateway
Validating core service: stoobly-ui
Validating setup containers: record-build.init-1
Validating core service: entrypoint
✔ Done validating core services for workflow: record, success!

Validating service: example-service
Validating hostname: example.com
Validating hostname exists in hosts file for hostname: example.com
Correct hosts mapping found for example.com
Validating connection to hostname: example.com, port: 443
Validating setup containers: record-example-service.init-1
Skipping validating public folder in workflow: record, container: record-example-service.init-1
Validating proxy container: record-example-service.proxy-1
Skipping validating public folder in workflow: record, container: record-example-service.proxy-1
✔ Done validating service: example-service, success!

Validating service: example-custom-container-service
Validating hostname: example-custom-container-service.com
Validating hostname exists in hosts file for hostname: example-custom-container-service.com
Correct hosts mapping found for example-custom-container-service.com
Validating connection to hostname: example-custom-container-service.com, port: 80
Validating setup containers: record-example-custom-container-service.init-1
Skipping validating public folder in workflow: record, container: record-example-custom-container-service.init-1
Validating proxy container: record-example-custom-container-service.proxy-1
Skipping validating public folder in workflow: record, container: record-example-custom-container-service.proxy-1
Validating local user defined service: example-custom-container-service
✔ Done validating service: example-custom-container-service, success!

✔ Done validating Stoobly scaffold and services, success!
```
