# ValidationDetector

**Kind:** Class

**Source:** [`atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/validation-detector.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/validation-detector.ts#L67)

Validation Detector

## Methods

| Method | Signature | Returns |
|---|---|---|
| `detect` | `detect(entities: Entity[])` | `DetectedValidation[]` |
| `describeValidation` | `describeValidation(validation: DetectedValidation)` | `string` |

## Where it refuses work

- `ValidationDetector` stops the work with an early return when `!code.includes('yup') && !code.includes('Yup')`.
- `ValidationDetector` stops the work with an early return when `!code.includes('z.object') && !code.includes('z.string')`.
- `ValidationDetector` stops the work with an early return when `!code.includes('Joi.object') && !code.includes('Joi.string')`.
- `ValidationDetector` stops the work with an early return when `!code.includes('@Is') && !code.includes('@Min') && !code.includes('@Max')`.
- `ValidationDetector` stops the work with an early return when `!code.includes('BaseModel') && !code.includes('Field(')`.
- `ValidationDetector` stops the work with an early return when `!code.includes('[Required]') && !code.includes('[StringLength')`.
