package
0.0.0-20240924214951-73a53bac2f18
Repository: https://github.com/kevuthedev/notes-backend-api.git
Documentation: pkg.go.dev

# Functions

Matches returns true if a string value matches a specific regexp pattern.
New is a helper which creates a new Validator instance with an empty errors map.
Generic function which returns true if a specific value is in a list.
TODO: Will have to make a string specific one such that it can compare strings STRINGS MUST BE lowercase BEFORE comparison.
Generic function which returns true if all values in a slice are unique.

# Variables

Declare a regular expression for sanity checking the format of email addresses (we'll use this later in the book).

# Structs

Define a new Validator type which contains a map of validation errors.