translations.go 425 B

1234567891011
  1. package validator
  2. import ut "github.com/go-playground/universal-translator"
  3. // TranslationFunc is the function type used to register or override
  4. // custom translations
  5. type TranslationFunc func(ut ut.Translator, fe FieldError) string
  6. // RegisterTranslationsFunc allows for registering of translations
  7. // for a 'ut.Translator' for use within the 'TranslationFunc'
  8. type RegisterTranslationsFunc func(ut ut.Translator) error