Developer Preview — This project is in active development. APIs may change. Provide feedback
Skip to content

@salesforce/b2c-tooling-sdk / scaffold / validateAgainstSource

Function: validateAgainstSource()

validateAgainstSource(source, value, projectRoot): object

Defined in: packages/b2c-tooling-sdk/src/scaffold/sources.ts:115

Validate a value against a dynamic source (local only). Used for non-interactive validation of provided values.

Parameters

source

DynamicParameterSource

The source type

value

string

The value to validate

projectRoot

string

Project root for local sources

Returns

object

Object with valid status and available choices if invalid

availableChoices?

optional availableChoices: string[]

valid

valid: boolean

Released under the Apache-2.0 License.