Password Validator v0.1.1 PasswordValidator.Validators.CharacterSetValidator View Source

Validates a password by checking the different types of characters contained within.

Link to this section Summary

Functions

Example config [ character_set: [

upper_case: [1, :infinity],
lower_case: 1,
numbers: 1,
special: [0, 0],
allowed_special_characters: "!@#$%^&*()",

] ]

Link to this section Functions

Link to this function do_validate_character_set(character_set, count, config) View Source
do_validate_character_set(atom, integer, list) ::
  :ok |
  {:error, String.t}

Example config [ character_set: [

upper_case: [1, :infinity],
lower_case: 1,
numbers: 1,
special: [0, 0],
allowed_special_characters: "!@#$%^&*()",

] ]

Link to this function validate_character_set(atom, map, config) View Source
validate_character_set(atom, map, %PasswordValidator.Validators.CharacterSetValidator.Config{allowed_special_characters: term, lower_case: term, numbers: term, special: term, upper_case: term}) ::
  :ok |
  {:error, String.t}