package
Version:
v0.0.0-...-91b10cc
Opens a new window with list of versions in this module.
Published: Oct 26, 2024
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
In checks if a string value is present in a list of strings.
Matches checks if a string value matches a specific regexp pattern.
Errors is a types alias of map[string]string
type Validator struct {
Errors Errors
}
New creates and returns an instance of a Validator.
AddError adds a new error to Validator.Errors with a given key and message.
If key already exists in the map, the message won't be added
Check checks a boolean expression. If the expression evaluates to `false`,
an error will be added to Validator.Errors
Valid returns true if the Validator.Errors map doesn't contain any entries.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.