Docs (4.0.0)
class ValidationTest method

assert

Throws an error if the specified condition is false.

assert(condition: any, errorMessage: StringConvertible): this

Parameters

  • condition — True for successful validation, false if the validation failed
  • errorMessage — The error message to be used; this string is used with AppException so that it can be localized using app.i18n.

Errors

  • This method throws an error if the validation fails

Related

  • class ValidationTest staticA class that represents a form validation test, passed to a form validation function.