Skip to content

ValidationDetector

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/validation-detector.ts

Validation Detector

Methods

MethodSignatureReturns
detectdetect(entities: Entity[])DetectedValidation[]
describeValidationdescribeValidation(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').

Was this page helpful?

Download as PDF