email

package
v3.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package email provides email address validation as a plugin.

The email package implements RFC-compliant email validation with support for basic email format validation, length limits, display name rejection (bare addresses only), local and domain part validation, and custom error messages and translations. The package registers itself as a plugin with the main validation system and provides comprehensive error handling with detailed error codes for different validation failure scenarios. It includes integration tests that verify end-to-end functionality through the main validation library.

Index

Constants

View Source
const (
	CodeEmailInvalid = "string.email.invalid"
	CodeEmailTooLong = "string.email.tooLong"
)

Email-specific error codes

View Source
const KEmail types.Kind = "email"

KEmail is the rule kind for email validation.

Variables

This section is empty.

Functions

func DefaultEmailTranslations

func DefaultEmailTranslations() map[string]string

DefaultEmailTranslations returns default English translations for email validation errors.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL