Skip to main content

BaseValidationTask

BaseValidationTask

Kind: global class

new BaseValidationTask(pluginName, context)

Creates a new instance of a validation Task.

ParamDescription
pluginNameThe name of the plugin this task is included in.
contextThe runtime task context passed to the Task.

baseValidationTask.addRuleComponentMetadata()

Adds componennt data to the rule metadata.

Kind: instance method of BaseValidationTask

baseValidationTask.addValidationStep(messageText, validate)

Adds a validation step to be run during this class' validate method.

Kind: instance method of BaseValidationTask

ParamTypeDescription
messageTextA non-empty string containing a plain text message
validateValidationResultA function to run that returns a indicating whether the validation was successful.

baseValidationTask.validate() โ‡’

Validates each step added by addValidationStep.

Kind: instance method of BaseValidationTask
Returns: A map of messages and ValidationResult objects

baseValidationTask.addValidationResult(messageText, isValid, options)

Adds a validation-specific result object to the Checkup output. '

Kind: instance method of BaseValidationTask

ParamDescription
messageTextA non-empty string containing a plain text message
isValidA boolean indicating whether the validation step is valid.
optionsAdditional options to pass to the result
options.locationSpecifies a location where the result occurred
options.propertiesA property bag named properties, which stores additional values on the result