Module cuttlefish_validator

Data Types

raw_validator()

raw_validator() = {validator, string(), string(), validator_fun()} | {validator, string(), string(), validator_fun(), [validator_opt()]}

validator()

validator() = #validator{name = string(), description = string(), func = function(), aliases = [string()], deprecated = undefined | {string(), string()}}

validator_fun()

validator_fun() = fun((any()) -> boolean())

validator_opt()

validator_opt() = {aliases, [string()]} | {deprecated, string(), string()}

Function Index

aliases/1
deprecated/1
description/1
func/1
is_validator/1
matches_name/2
name/1
parse/1
parse_and_merge/2
replace/2

Function Details

aliases/1

aliases(V::validator()) -> [string()]

deprecated/1

deprecated(V::validator()) -> undefined | {string(), string()}

description/1

description(V::validator()) -> string()

func/1

func(V::validator()) -> function()

is_validator/1

is_validator(V::any()) -> boolean()

matches_name/2

matches_name(Name::string(), V::validator()) -> boolean()

name/1

name(V::validator()) -> string()

parse/1

parse(X::raw_validator()) -> validator() | cuttlefish_error:error()

parse_and_merge/2

parse_and_merge(ValidatorSource::raw_validator(), Validators::[validator()]) -> [validator()]

replace/2

replace(Validator::validator(), ListOfValidators::[validator()]) -> [validator()]


Generated by EDoc