locale

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EN = map[string]any{
	"required":        "The %s field is required.",
	"string":          "The %s must be a string.",
	"alpha":           "The %s may only contain letters.",
	"numeric":         "The %s must be a number.",
	"alpha_numeric":   "The %s may only contain letters and numbers.",
	"int":             "The %s must be an integer.",
	"uint":            "The %s must be a positive integer.",
	"float":           "The %s must be a float.",
	"email":           "The %s must be a valid email address.",
	"phone":           "The %s must be a valid phone number.",
	"phone_with_code": "The %s must be a valid phone number with country code.",
	"username":        "The %s must be a valid email address or phone number or phone number with country code.",
	"match":           "The %s does not matched.",
	"same":            "The %s and %s must match.",
	"unique":          "The %s has already been taken.",
	"bool":            "The %s field must be true.",
	"file":            "The %s must be a file.",
	"file_type":       "The %s must be a file of type: %s.",
	"image":           "The %s must be an image.",
	"image_type":      "The %s must be an image of type: %s.",
	"mimes":           "The %s must be a file of type: %s.",
	"gh_card":         "The %s must be a valid Ghana Card.",
	"gh_gps":          "The %s must be a valid Ghana digital address.",
	"gt": map[string]string{
		"numeric": "The %s must be greater than %s.",
		"file":    "The %s must be greater than %s megabytes.",
		"string":  "The %s must be greater than %s characters.",
		"slice":   "The %s must have more than %s items.",
	},
	"gte": map[string]string{
		"numeric": "The %s must be greater than or equal to %s.",
		"file":    "The %s must be greater than or equal to %s megabytes.",
		"string":  "The %s must be greater than or equal to %s characters.",
		"slice":   "The %s must have %s items or more.",
	},
	"lt": map[string]string{
		"numeric": "The %s must be less than %s.",
		"file":    "The %s must be less than %s megabytes.",
		"string":  "The %s must be less than %s characters.",
		"slice":   "The %s must have less than %s items.",
	},
	"lte": map[string]string{
		"numeric": "The %s must be less than or equal to %s.",
		"file":    "The %s must be less than or equal to %s megabytes.",
		"string":  "The %s must be less than or equal to %s characters.",
		"slice":   "The %s must not have more than %s items.",
	},
	"min": map[string]string{
		"numeric": "The %s must be at least %s",
		"file":    "The %s must be at least %s megabytes.",
		"string":  "The %s must be at least %s characters.",
		"slice":   "The %s must have at least %s items.",
	},
	"max": map[string]string{
		"numeric": "The %s must not be greater than %s.",
		"file":    "The %s must not be greater than %s megabytes.",
		"string":  "The %s must not be greater than %s characters.",
		"slice":   "The %s must not have more than %s items.",
	},
	"equal": map[string]string{
		"numeric": "The %s must be equal to %s.",
		"file":    "The %s must be equal to %s megabytes.",
		"string":  "The %s must be equal to %s characters.",
		"slice":   "The %s must be equal to %s items.",
	},
	"between": map[string]string{
		"numeric": "The %s must be between %s and %s.",
		"file":    "The %s must be between %s and %s megabytes.",
		"string":  "The %s must be between %s and %s characters.",
		"slice":   "The %s must be between %s and %s items.",
	},
	"from": map[string]string{
		"numeric": "The %s must be from %s to %s.",
		"file":    "The %s must be from %s to %s megabytes.",
		"string":  "The %s must be from %s to %s characters.",
		"slice":   "The %s must be from %s to %s items.",
	},
	"size": map[string]string{
		"numeric": "The %s must be %s.",
		"file_kb": "The %s must be %s kilobytes.",
		"file_mb": "The %s must be %s megabytes.",
		"file_gb": "The %s must be %s gigabytes.",
		"string":  "The %s must be %s characters.",
		"slice":   "The %s must contain %s items.",
	},
	"date": map[string]string{
		"rfc3339":  "The %s does not match the format: 2006-01-02T00:00:00Z",
		"datetime": "The %s does not match the format: 2006-01-02 15:04:05",
		"dateonly": "The %s does not match the format: 2006-01-02",
	},
}

EN locale validation message.

View Source
var FR = map[string]any{
	"required":        "Le champ %s est requis.",
	"string":          "Le champ %s doit être une chaîne de caractères.",
	"alpha":           "Le champ %s ne peut contenir que des lettres.",
	"numeric":         "Le champ %s doit être un nombre.",
	"alpha_numeric":   "Le champ %s ne peut contenir que des lettres et des chiffres.",
	"int":             "Le champ %s doit être un entier.",
	"uint":            "Le champ %s doit être un entier positif.",
	"float":           "Le champ %s doit être un nombre décimal.",
	"email":           "Le champ %s doit être une adresse e-mail valide.",
	"phone":           "Le champ %s doit être un numéro de téléphone valide.",
	"phone_with_code": "Le champ %s doit être un numéro de téléphone valide avec un code pays.",
	"username":        "Le champ %s doit être une adresse e-mail, un numéro de téléphone ou un numéro de téléphone avec code pays valide.",
	"match":           "Le champ %s ne correspond pas.",
	"same":            "Les champs %s et %s doivent correspondre.",
	"unique":          "Le champ %s a déjà été pris.",
	"bool":            "Le champ %s doit être vrai.",
	"file":            "Le champ %s doit être un fichier.",
	"file_type":       "Le champ %s doit être un fichier du type : %s.",
	"image":           "Le champ %s doit être une image.",
	"image_type":      "Le champ %s doit être une image du type : %s.",
	"mimes":           "Le champ %s doit être un fichier du type : %s.",
	"gh_card":         "Le champ %s doit être une carte d'identité du Ghana valide.",
	"gh_gps":          "Le champ %s doit être une adresse numérique du Ghana valide.",
	"gt": map[string]string{
		"numeric": "Le champ %s doit être supérieur à %s.",
		"file":    "Le champ %s doit être supérieur à %s mégaoctets.",
		"string":  "Le champ %s doit comporter plus de %s caractères.",
		"slice":   "Le champ %s doit contenir plus de %s éléments.",
	},
	"gte": map[string]string{
		"numeric": "Le champ %s doit être supérieur ou égal à %s.",
		"file":    "Le champ %s doit être supérieur ou égal à %s mégaoctets.",
		"string":  "Le champ %s doit être supérieur ou égal à %s caractères.",
		"slice":   "Le champ %s doit contenir %s éléments ou plus.",
	},
	"lt": map[string]string{
		"numeric": "Le champ %s doit être inférieur à %s.",
		"file":    "Le champ %s doit être inférieur à %s mégaoctets.",
		"string":  "Le champ %s doit comporter moins de %s caractères.",
		"slice":   "Le champ %s doit contenir moins de %s éléments.",
	},
	"lte": map[string]string{
		"numeric": "Le champ %s doit être inférieur ou égal à %s.",
		"file":    "Le champ %s doit être inférieur ou égal à %s mégaoctets.",
		"string":  "Le champ %s doit être inférieur ou égal à %s caractères.",
		"slice":   "Le champ %s ne doit pas contenir plus de %s éléments.",
	},
	"min": map[string]string{
		"numeric": "Le champ %s doit être au moins égal à %s",
		"file":    "Le champ %s doit être d'au moins %s mégaoctets.",
		"string":  "Le champ %s doit comporter au moins %s caractères.",
		"slice":   "Le champ %s doit contenir au moins %s éléments.",
	},
	"max": map[string]string{
		"numeric": "Le champ %s ne doit pas être supérieur à %s.",
		"file":    "Le champ %s ne doit pas dépasser %s mégaoctets.",
		"string":  "Le champ %s ne doit pas dépasser %s caractères.",
		"slice":   "Le champ %s ne doit pas contenir plus de %s éléments.",
	},
	"equal": map[string]string{
		"numeric": "Le champ %s doit être égal à %s.",
		"file":    "Le champ %s doit être égal à %s mégaoctets.",
		"string":  "Le champ %s doit être égal à %s caractères.",
		"slice":   "Le champ %s doit être égal à %s éléments.",
	},
	"between": map[string]string{
		"numeric": "Le champ %s doit être compris entre %s et %s.",
		"file":    "Le champ %s doit être compris entre %s et %s mégaoctets.",
		"string":  "Le champ %s doit être compris entre %s et %s caractères.",
		"slice":   "Le champ %s doit être compris entre %s et %s éléments.",
	},
	"from": map[string]string{
		"numeric": "Le champ %s doit être compris entre %s et %s.",
		"file":    "Le champ %s doit être compris entre %s et %s mégaoctets.",
		"string":  "Le champ %s doit être compris entre %s et %s caractères.",
		"slice":   "Le champ %s doit être compris entre %s et %s éléments.",
	},
	"size": map[string]string{
		"numeric": "Le champ %s doit être %s.",
		"file_kb": "Le champ %s doit être de %s kilooctets.",
		"file_mb": "Le champ %s doit être de %s mégaoctets.",
		"file_gb": "Le champ %s doit être de %s gigaoctets.",
		"string":  "Le champ %s doit comporter %s caractères.",
		"slice":   "Le champ %s doit contenir %s éléments.",
	},
	"date": map[string]string{
		"rfc3339":  "Le champ %s ne correspond pas au format: 2006-01-02T00:00:00Z",
		"datetime": "Le champ %s ne correspond pas au format: 2006-01-02 15:04:05",
		"dateonly": "Le champ %s ne correspond pas au format: 2006-01-02",
	},
}

FR locale validation message.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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