Documentation
    Preparing search index...
    • Inspect the validator direct usage code snippets. A member expression calling the ".validate" method is considered as direct usage of the validator.

      This function specifically looks for patterns where validators are called directly with the .validate() method, which is common in AdonisJS applications.

      Parameters

      • node: SgNode

        The AST node to search within for validator direct usage

      Returns SgNode<TypesMap, Kinds<TypesMap>>[]

      Array of SgNodes representing validator expressions that call validate method

      const methodNode = classNode.find({ rule: { kind: 'method_definition' } })
      const validators = searchValidatorDirectUsage(methodNode)
      validators.forEach(validator => {
      console.log('Direct validator usage:', nodeToPlainText(validator))
      })