Input

  • input: The original input text or data
  • output: The value to be validated (string or number)
  • expectedOutput: The expected output to compare against.
  • Any of the input variables (input, output, expectedOutput) can be marked as optional.
  • The returned value from the validate function can be a boolean, string, or a number.

Output

  • Result: Boolean (true or false) | string | number

Interpretation

Assuming this evaluator returns a boolean
  • true: The value is within (0, 100)
  • false: The value is outside the range or invalid
This evaluator requires a function named validate.

Example

def validate(input, output, expectedOutput):
    try:
        value = float(output)
    except (TypeError, ValueError):
        return False
    return 0 < value < 100