Documentation ¶
Overview ¶
Package validation provide utilities functions for data validation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateEmail ¶
func ValidateLength ¶
ValidateLength checks whether the given data match the given rules.
It checks if the value has more or equal `min` chars and less or equal `max` chars. If you don't want to check both, just pass a zero value:
ValidateLength(value, 0, 100) // Checks if value has at most 100 characters ValidateLength(value, 100, 0) // Checks if value has at least 100 characters ValidateLength(value, 20, 100) // Checks if value has at least 20 characters and at most 100 characters
func ValidateName ¶
ValidateName checks wether the given data contains at most 63 characters containing only lower case letters, numbers or dashes and starts with a letter
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.