View Source PasswordValidator.Validator behaviour (Password Validator v0.5.0)

Specifies the behaviour needed to implement a custom (or built-in) validator.

Link to this section Summary

Callbacks

Validate the given string and return :ok or {:error, errors} where errors is a list.

Link to this section Types

@type error_info() :: String.t() | {String.t(), Keyword.t()}

Link to this section Callbacks

@callback validate(String.t(), Keyword.t()) :: :ok | {:error, [error_info(), ...]}

Validate the given string and return :ok or {:error, errors} where errors is a list.

Link to this section Functions

Link to this function

return_errors_or_ok(results)

View Source
@spec return_errors_or_ok(list()) :: :ok | {:error, [...]}
Link to this function

return_errors_or_ok_old(results)

View Source