Share via


Management of Speech Validator Controls

  Microsoft Speech Technologies Homepage

The Speech CompareValidator and CustomValidator controls perform data validation independent of RunSpeech. When their data targets are valid, they produce no spoken output, and they are not activated by RunSpeech. When their data targets are invalid, they must play an error message prompt, and they are activated by RunSpeech to play the prompt.

The SemanticItemToValidate property of a Speech validator control specifies the SemanticItem that contains the data that the control validates. The ValidationEvent property of the validator determines whether validation is invoked by the Changed event or by the Confirmed event of the target SemanticItem control. Typically these events are raised by the binding or the confirmation of data collected by a QA control.

Each Speech validator control maintains an internal variable for its validation state. The variable is initially VALID, and after the control validates its target data, it sets this state variable to VALID or INVALID, depending on the validity of the target data. When RunSpeech evaluates the controls on a page, seeking the next control to activate, it ignores any validator in the VALID state.

Activation conditions

CompareValidator and CustomValidator:

  • The state of the control is INVALID.

Control Behavior When Activated

CompareValidator control

  • The control clears the data referenced by its SemanticItemToValidate property.
  • If its InvalidateBoth property is True, it clears the data referenced by its SemanticItemToCompare property.
  • The control plays its error message prompt.
  • The control returns control to RunSpeech.

CustomValidator control

  • The control clears the data referenced by its SemanticItemToValidate property.
  • The control plays its error message prompt.
  • The control returns control to RunSpeech.