Workflow Validation Functions

Workflow validation methods allow you to access the Mobile Workflow application validation functions.

The Mobile Workflow validation methods are synchronous.
Method Description
setValidationText(helpElement, helpMessage) Sets the text for the specified help element.
validateRegularExpression(value, regularExp, userSuppliedMsg, helpElement) Returns true if the specified value matches the specified regular expression.
  • value – the specified value.
  • regularExp – the specified regular expression.
  • (Optional) userSuppliedMsg –the message to use if the specified value is invalid.
  • (Optional) helpElement – the help element.
validateDate(value, required, minValue, maxValue, userSuppliedMsg, helpElement) Returns 0 if the specified value represents a valid date, given the constraints specified; otherwise, returns an error code.
  • value – the specified value.
  • (Optional) required – true if the value must be specified, otherwise, false.
  • (Optional)minValue – the minimum allowable value.
  • (Optional) maxValue – the maximum allowable value.
  • (Optional) userSuppliedMsg – the message to use if the specified value is invalid.
  • (Optional) helpElement – the help element.
validateDateTime(value, required, minValue, maxValue, userSuppliedMsg, helpElement) Returns 0 if the specified value represents a valid datetime, given the constraints specified; otherwise, returns an error code.
  • value – the specified value.
  • (Optional) required – true if the value must be specified, otherwise, false.
  • (Optional) minValue – the minimum allowable value.
  • (Optional) maxValue – the maximum allowable value.
  • (Optional) userSuppliedMsg – the message to use if the specified value is invalid.
  • (Optional) helpElement – the help element.
validateTime(value, required, minValue, maxValue, userSuppliedMsg, helpElement) Returns 0 if the specified value represents a valid time, given the constraints specified; otherwise, returns an error code.
  • value – the specified value.
  • (Optional) required – true if the value must be specified, otherwise, false.
  • (Optional) minValue – the minimum allowable value.
  • (Optional) maxValue – the maximum allowable value.
  • (Optional) userSuppliedMsg – the message to use if the specified value is invalid.
  • (Optional) helpElement – the help element.
validateNumber(value, required, minValue, maxValue, numOfDecimals, maxLength, userSuppliedMsg, helpElement) Returns 0 if the specified value represents a valid number, given the constraints specified; otherwise, returns an error code.
  • value – the specified value.
  • (Optional) required – true if the value must be specified, otherwise, false.
  • (Optional) minValue – the minimum allowable value.
  • (Optional) maxValue – the maximum allowable value.
  • (Optional) numOfDecimals – the maximum allowable number of digits after the decimal place.
  • (Optional) maxLength – the maximum number of characters.
  • (Optional) userSuppliedMsg – the message to use if the specified value is invalid.
  • (Optional) helpElement – the help element.
validateText(value, required, maxLength, userSuppliedMsg, helpElement) Returns 0 if the specified value represents a valid text, given the constraints specified; otherwise, returns an error code.
  • value – the specified value.
  • (Optional) required – true if the value must be specified, otherwise, false.
  • (Optional) maxLength – the maximum number of characters.
  • (Optional) userSuppliedMsg – the message to use if the specified value is invalid.
  • (Optional) helpElement – the help element.
validateEmail(value, helpElement) Returns 0 if the specified value represents a valid email; otherwise, returns an error code.
  • value– the specified value.
  • (Optional) helpElement – the help element.
validateControl(screenKey, controlKey, control) Validates the specified control.
  • screenKey – the screen the control is on.
  • controlKey – the control's key.
  • control – the HTML element for the control.
validateScreen(screenName, values, keysToValidate) Validates the specified screen.
  • screenName– the specified screen.
  • values – the current message value collection.
  • keysToValidate –
validateAllScreens() Validates all open screens.