LIVR


Rules

More rules are available with https://fperrad.frama.io/lua-LIVR-extra.

Common Rules

See https://livr-spec.org/validation-rules/common-rules.html.

required

not_empty

not_empty_list

any_object

String Rules

See https://livr-spec.org/validation-rules/string-rules.html.

string

eq

one_of

max_length

min_length

length_between

length_equal

The correct computation of the length of UTF-8 string requires Lua 5.3, or compat53 or lua-utf8.

like

Lrexlib-PCRE allows the use of PCRE regexp, otherwise like behaves as like_lua.

like_lua

This rule allows to use Lua patterns as regexp.

Numeric Rules

See https://livr-spec.org/validation-rules/numeric-rules.html.

integer

positive_integer

decimal

positive_decimal

max_number

min_number

number_between

Special Rules

See https://livr-spec.org/validation-rules/special-rules.html.

email

url

iso_date

equal_to_field

Metarules

See https://livr-spec.org/validation-rules/metarules.html.

nested_object

variable_object

list_of

list_of_objects

list_of_different_objects

or (experimental)

Modifiers

See https://livr-spec.org/validation-rules/modifiers.html.

trim

to_lc

The correct processing of UTF-8 string requires lua-utf8.

to_uc

The correct processing of UTF-8 string requires lua-utf8.

remove

leave_only

default