package
0.0.0-20241214133101-a369ccfad082
Repository: https://github.com/0xshiku/snippetbox.git
Documentation: pkg.go.dev

# Functions

Matches() returns true if a value matches a provided compiled regular expression pattern.
MaxChars() returns true if a value contains no more than n characters.
MinChars() returns true if a value contains at least n characters.
NotBlank() returns true if a value is not an empty string.
PermittedInt() returns true if a value is in a list of permitted integers.
PermittedValue() Replace PermittedInt with a generic PermittedValue() function.

# Variables

Use the regexp.MustCompile() function to parse a regular expression pattern for sanity the format of an email address.

# Structs

Defines a new Validator type which contains a map of validation errors for our form fields Add a new NonFieldErrors []string field to the struct, which we will use to hold any validation errors which are not related to a specific form field.