File check.lua

General validation functions.

Release: $Id: check.lua,v 1.5 2008/04/09 03:16:15 tomas Exp $

Functions

func (v, n, f) Asserts that value is a function.
num (v, n, f) Asserts that value is a number or a string which can be coerced to a number.
optfunc (v, n, f) Asserts that value is an optional function.
optstr (v, n, f) Asserts that value is an optional string.
opttable (v, n, f) Asserts that value is an optional table.
str (v, n, f) Asserts that value is a string or a number.
table (v, n, f) Asserts that value is a table.
udata (v, n, f) Asserts that value is a userdata.


Functions

func (v, n, f)
Asserts that value is a function.

Parameters

  • v: Value to be checked.
  • n: Number of argument.
  • f: Function name.
num (v, n, f)
Asserts that value is a number or a string which can be coerced to a number.

Parameters

  • v: Value to be checked.
  • n: Number of argument.
  • f: Function name.
optfunc (v, n, f)
Asserts that value is an optional function.

Parameters

  • v: Value to be checked.
  • n: Number of argument.
  • f: Function name.

See also:

optstr (v, n, f)
Asserts that value is an optional string.

Parameters

  • v: Value to be checked.
  • n: Number of argument.
  • f: Function name.

See also:

opttable (v, n, f)
Asserts that value is an optional table.

Parameters

  • v: Value to be checked.
  • n: Number of argument.
  • f: Function name.

See also:

str (v, n, f)
Asserts that value is a string or a number.

Parameters

  • v: Value to be checked.
  • n: Number of argument.
  • f: Function name.
table (v, n, f)
Asserts that value is a table.

Parameters

  • v: Value to be checked.
  • n: Number of argument.
  • f: Function name.
udata (v, n, f)
Asserts that value is a userdata.

Parameters

  • v: Value to be checked.
  • n: Number of argument.
  • f: Function name.

Valid XHTML 1.0!